diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-09-18 16:24:17 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-09-21 08:07:32 (GMT) |
commit | fe55b6083ab6417a83141c719184772d9a375d17 (patch) | |
tree | 41aa7456ac019766877f9fdb2d9c031fcaf59c0f /tests | |
parent | 58b92a951899f74b63048a36c451d3355c0c5a7f (diff) | |
download | Qt-fe55b6083ab6417a83141c719184772d9a375d17.zip Qt-fe55b6083ab6417a83141c719184772d9a375d17.tar.gz Qt-fe55b6083ab6417a83141c719184772d9a375d17.tar.bz2 |
Fix one QDialog auto test case where due to changed S60 positioning rules,
case failed.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qdialog/tst_qdialog.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp index 39ed837..5f2ccd3 100644 --- a/tests/auto/qdialog/tst_qdialog.cpp +++ b/tests/auto/qdialog/tst_qdialog.cpp @@ -194,13 +194,34 @@ void tst_QDialog::showExtension() QCOMPARE( testWidget->size(), dlgSize ); QPoint oldPosition = testWidget->pos(); - + +#ifdef Q_WS_S60 + const int htDiff = ext->size().height() - testWidget->size().height(); +#endif // show ((DummyDialog*)testWidget)->showExtension( TRUE ); // while ( testWidget->size() == dlgSize ) // qApp->processEvents(); + +#ifdef Q_WS_S60 + QPoint expectedPosition; + if (!horizontal) { + expectedPosition = QPoint(0, oldPosition.y() - extSize.height()); + } else { + if (htDiff>0) + expectedPosition = QPoint(0, oldPosition.y() - htDiff); + else + expectedPosition = oldPosition; + } +#endif + QTEST( testWidget->size(), "result" ); + +#ifdef Q_WS_S60 + QCOMPARE(testWidget->pos(), expectedPosition); +#else QCOMPARE(testWidget->pos(), oldPosition); +#endif // hide extension. back to old size ? ((DummyDialog*)testWidget)->showExtension( FALSE ); |