diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index a03f112..050d1c5 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -4391,12 +4391,27 @@ void tst_QWidget::winIdChangeEvent() { // Changing parent of a native widget + // Should cause winId of child to change, on all platforms QWidget parent1, parent2; WinIdChangeWidget child(&parent1); const WId winIdBefore = child.winId(); QCOMPARE(child.m_winIdChangeEventCount, 1); child.setParent(&parent2); const WId winIdAfter = child.internalWinId(); + QVERIFY(winIdBefore != winIdAfter); + QCOMPARE(child.m_winIdChangeEventCount, 2); + } + + { + // Changing grandparent of a native widget + // Should cause winId of grandchild to change only on Symbian + QWidget grandparent1, grandparent2; + QWidget parent(&grandparent1); + WinIdChangeWidget child(&parent); + const WId winIdBefore = child.winId(); + QCOMPARE(child.m_winIdChangeEventCount, 1); + parent.setParent(&grandparent2); + const WId winIdAfter = child.internalWinId(); #ifdef Q_OS_SYMBIAN QVERIFY(winIdBefore != winIdAfter); QCOMPARE(child.m_winIdChangeEventCount, 2); |