diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-02 17:01:13 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-02 17:01:13 (GMT) |
commit | 20cfe1e790295254370cf472df39813f864de7ea (patch) | |
tree | 98ac008f7c468ed37a61c051870810db2bbf2360 /tests/auto/qdockwidget/tst_qdockwidget.cpp | |
parent | 83e497fdae56e11c79d913cdc665e78615291e9c (diff) | |
parent | 2ed925753cb194970712330edca4da8e91fa8f28 (diff) | |
download | Qt-20cfe1e790295254370cf472df39813f864de7ea.zip Qt-20cfe1e790295254370cf472df39813f864de7ea.tar.gz Qt-20cfe1e790295254370cf472df39813f864de7ea.tar.bz2 |
Merge remote branch 'mainline/4.6' into 4.6
Diffstat (limited to 'tests/auto/qdockwidget/tst_qdockwidget.cpp')
-rw-r--r-- | tests/auto/qdockwidget/tst_qdockwidget.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp index dc67f36..e62ba8c 100644 --- a/tests/auto/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp @@ -86,6 +86,7 @@ private slots: void visibilityChanged(); void dockLocationChanged(); void setTitleBarWidget(); + void titleBarDoubleClick(); // task specific tests: void task165177_deleteFocusWidget(); void task169808_setFloating(); @@ -694,6 +695,24 @@ void tst_QDockWidget::setTitleBarWidget() QCOMPARE(w2.isVisible(), false); } +void tst_QDockWidget::titleBarDoubleClick() +{ + QMainWindow win; + QDockWidget dock(&win); + win.show(); + dock.setFloating(true); + + QEvent e(QEvent::NonClientAreaMouseButtonDblClick); + QApplication::sendEvent(&dock, &e); + QVERIFY(dock.isFloating()); + QCOMPARE(win.dockWidgetArea(&dock), Qt::NoDockWidgetArea); + + win.addDockWidget(Qt::TopDockWidgetArea, &dock); + dock.setFloating(true); + QApplication::sendEvent(&dock, &e); + QVERIFY(!dock.isFloating()); + QCOMPARE(win.dockWidgetArea(&dock), Qt::TopDockWidgetArea); +} void tst_QDockWidget::task165177_deleteFocusWidget() { |