diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-09-28 13:29:13 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-09-28 13:29:13 (GMT) |
commit | 124b4a1a5832d21d63722ee5ac68007083a4f8ae (patch) | |
tree | ff987348820e659fa69fb242017951673fdcd151 /tests/auto | |
parent | 3a52aeb622da3f7d4171ea64df7896fa5d2d7d4a (diff) | |
parent | e131a4653ec13e9a680a4b41094e78f2cc929f4d (diff) | |
download | Qt-124b4a1a5832d21d63722ee5ac68007083a4f8ae.zip Qt-124b4a1a5832d21d63722ee5ac68007083a4f8ae.tar.gz Qt-124b4a1a5832d21d63722ee5ac68007083a4f8ae.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qmessagebox/tst_qmessagebox.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qtextdocument/tst_qtextdocument.cpp | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp index 64e5a9c..5607fbd 100644 --- a/tests/auto/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp @@ -130,7 +130,7 @@ private slots: void testSymbols(); void incorrectDefaultButton(); void updateSize(); - + void setInformativeText(); void iconPixmap(); @@ -683,7 +683,13 @@ void tst_QMessageBox::incorrectDefaultButton() void tst_QMessageBox::updateSize() { QMessageBox box; +#ifdef Q_WS_S60 + // In S60 messagebox is always occupies maximum width, i.e. screen width + // so we need to have long enough text to split over several line + box.setText("This is awesome long text"); +#else box.setText("This is awesome"); +#endif box.show(); QSize oldSize = box.size(); QString longText; @@ -693,9 +699,12 @@ void tst_QMessageBox::updateSize() QVERIFY(box.size() != oldSize); // should have grown QVERIFY(box.width() > oldSize.width() || box.height() > oldSize.height()); oldSize = box.size(); +#ifndef Q_WS_S60 + // In S60 dialogs buttons are in softkey area -> message box size does not change box.setStandardButtons(QMessageBox::StandardButtons(0xFFFF)); QVERIFY(box.size() != oldSize); // should have grown QVERIFY(box.width() > oldSize.width() || box.height() > oldSize.height()); +#endif } void tst_QMessageBox::setInformativeText() diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index c0d7ed3..f393393 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -1787,21 +1787,17 @@ void tst_QTextDocument::cursorPositionChangedOnSetText() { CursorPosSignalSpy spy(doc); - cursor = QTextCursor(); + // doc has one QTextCursor stored in the + // cursor member variable, thus the signal + // gets emitted once. doc->setPlainText("Foo\nBar\nBaz\nBlub\nBlah"); - // the signal should still be emitted once for the QTextCursor that - // QTextDocument::setPlainText creates temporarily. But the signal - // should not be emitted more often. QCOMPARE(spy.calls, 1); spy.calls = 0; doc->setHtml("<p>Foo<p>Bar<p>Baz<p>Blah"); - // the signal should still be emitted once for the QTextCursor that - // QTextDocument::setPlainText creates temporarily. But the signal - // should not be emitted more often. QCOMPARE(spy.calls, 1); } |