summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorDmitry Kazakov <dimula73@gmail.com>2018-12-06 16:16:27 +0300
committerDmitry Kazakov <dimula73@gmail.com>2019-05-07 17:28:23 +0000
commit06b8644953fc526707b5fe24c8ef08f4829ba1c6 (patch)
treed06fb39be98a5b7bf0b40b21e87325a240ef4349 /tests/auto
parent92f984273262531f909ede17a324f546fe502b5c (diff)
Fix notification of QDockWidget when it gets undocked
Before the patch the notification was emitted only when the docker was attached to the panel or changed a position on it. It looks like the old behavior was documented in a unittest, so this patch might actually be a "behavior change". Change-Id: Id3ffbd2018a8e68844d174328dd1c4ceb7fa01d3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index f8ce6a2c0a..625116654d 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -670,7 +670,11 @@ void tst_QDockWidget::dockLocationChanged()
spy.clear();
dw.setFloating(true);
- QTest::qWait(100);
+ QTRY_COMPARE(spy.count(), 1);
+ QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)),
+ Qt::NoDockWidgetArea);
+ spy.clear();
+
dw.setFloating(false);
QTRY_COMPARE(spy.count(), 1);
QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)),