Add assert

This commit is contained in:
Syarif Fakhri 2022-09-15 12:15:33 +08:00
parent 68e5aec912
commit 68a3bcde08

View File

@ -1471,6 +1471,8 @@ CDockContainerWidget::~CDockContainerWidget()
CDockAreaWidget* CDockContainerWidget::addDockWidget(DockWidgetArea area, CDockWidget* Dockwidget, CDockAreaWidget* CDockContainerWidget::addDockWidget(DockWidgetArea area, CDockWidget* Dockwidget,
CDockAreaWidget* DockAreaWidget) CDockAreaWidget* DockAreaWidget)
{ {
Q_ASSERT_X(!DockAreaWidget->isOverlayed(), "CDockContainerWidget::addDockWidget", "Adding a dock widget to an area that is already overlayed is not supported.");
CDockAreaWidget* OldDockArea = Dockwidget->dockAreaWidget(); CDockAreaWidget* OldDockArea = Dockwidget->dockAreaWidget();
if (OldDockArea) if (OldDockArea)
{ {