diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-18 13:24:41 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-18 13:24:41 (GMT) |
commit | 1f8703d6faf855a96de0403f5926062bd2e2b3ee (patch) | |
tree | d27a75ff167c70bf8902bcde140632551e8cec79 /tests/auto/qwidget | |
parent | 349d2dd29cd6f4c90c1890e3f56850883f5ac07d (diff) | |
parent | 6dcdab8d9ee66f420a525400d873cfccf78c7003 (diff) | |
download | Qt-1f8703d6faf855a96de0403f5926062bd2e2b3ee.zip Qt-1f8703d6faf855a96de0403f5926062bd2e2b3ee.tar.gz Qt-1f8703d6faf855a96de0403f5926062bd2e2b3ee.tar.bz2 |
Merge remote branch 'qt/4.7' into lighthouse-4.7
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index a94b9d7..29213d4 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -402,6 +402,7 @@ private slots: void scrollWithoutBackingStore(); void taskQTBUG_7532_tabOrderWithFocusProxy(); + void movedAndResizedAttributes(); private: bool ensureScreenSize(int width, int height); @@ -10043,5 +10044,61 @@ void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy() // No Q_ASSERT, then it's allright. } +void tst_QWidget::movedAndResizedAttributes() +{ +#if defined (Q_OS_MAC) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) + QEXPECT_FAIL("", "FixMe, QTBUG-8941 and QTBUG-8977", Abort); + QVERIFY(false); +#else + QWidget w; + w.show(); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.setWindowState(Qt::WindowFullScreen); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.setWindowState(Qt::WindowMaximized); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.setWindowState(Qt::WindowMinimized); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.showNormal(); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.showMaximized(); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.showFullScreen(); + + QVERIFY(!w.testAttribute(Qt::WA_Moved)); + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.showNormal(); + w.move(10,10); + QVERIFY(w.testAttribute(Qt::WA_Moved)); +#if defined(Q_OS_WIN) + QEXPECT_FAIL("", "FixMe, QTBUG-8911", Abort); +#endif + QVERIFY(!w.testAttribute(Qt::WA_Resized)); + + w.resize(100, 100); + QVERIFY(w.testAttribute(Qt::WA_Moved)); + QVERIFY(w.testAttribute(Qt::WA_Resized)); +#endif +} + QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" |