From 68a3bcde08d9316c740727d40c938a80f42a1a62 Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Thu, 15 Sep 2022 12:15:33 +0800 Subject: [PATCH] Add assert --- src/DockContainerWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index 32de115..20950f1 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -1471,6 +1471,8 @@ CDockContainerWidget::~CDockContainerWidget() CDockAreaWidget* CDockContainerWidget::addDockWidget(DockWidgetArea area, CDockWidget* Dockwidget, 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(); if (OldDockArea) {