Add Frame::detachTab()

The tab widget will be an implementation detail of FrameWidget and
not accessed by anyone
This commit is contained in:
Sergio Martins
2020-06-03 21:18:38 +01:00
parent e418725c13
commit 0a75d89848
5 changed files with 15 additions and 6 deletions

View File

@@ -254,14 +254,14 @@ void DockWidgetBase::setFloating(bool floats)
if (floats) {
d->saveTabIndex();
if (isTabbed()) {
TabWidget *tabWidget= d->parentTabWidget();
if (!tabWidget) {
qWarning() << "DockWidget::setFloating: Tabbed but no tabbar exists"
auto frame = this->frame();
if (!frame) {
qWarning() << "DockWidget::setFloating: Tabbed but no frame exists"
<< this;
Q_ASSERT(false);
}
tabWidget->detachTab(this);
frame->detachTab(this);
} else {
frame()->titleBar()->makeWindow();
}