Replace CDockWidget::releaseWidget() with CDockWidget::takeWidget()

This commit is contained in:
Tibo Clausen 2019-05-16 13:08:48 +01:00
parent b9b8ff9c76
commit c630a59afe
2 changed files with 3 additions and 2 deletions

View File

@ -263,11 +263,12 @@ void CDockWidget::setWidget(QWidget* widget, eInsertMode InsertMode)
//============================================================================
void CDockWidget::releaseWidget()
QWidget* CDockWidget::takeWidget()
{
d->ScrollArea->takeWidget();
d->Layout->removeWidget(d->Widget);
d->Widget->setParent(nullptr);
return d->Widget;
}

View File

@ -241,7 +241,7 @@ public:
/**
* Remove the widget from the dock and give ownership back to the caller
*/
void releaseWidget();
QWidget* takeWidget();
/**
* Returns the widget for the dock widget. This function returns zero if