diff options
Diffstat (limited to 'tests/auto/qcombobox/tst_qcombobox.cpp')
-rw-r--r-- | tests/auto/qcombobox/tst_qcombobox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index 6a87e3c..e881496 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -1230,7 +1230,6 @@ void tst_QComboBox::insertItem() testWidget->setEditable(true); if (editable) testWidget->setEditText("FOO"); - #if defined (QT3_SUPPORT) if (testQt3Support) testWidget->insertItem(itemLabel, insertIndex); @@ -1244,7 +1243,7 @@ void tst_QComboBox::insertItem() QCOMPARE(testWidget->count(), initialItems.count() + 1); QCOMPARE(testWidget->itemText(expectedIndex), itemLabel); - + if (editable) QCOMPARE(testWidget->currentText(), QString("FOO")); } @@ -1891,10 +1890,10 @@ void tst_QComboBox::itemListPosition() //tests that the list is not out of the screen boundaries //put the QApplication layout back - qApp->setLayoutDirection(Qt::LeftToRight); + QApplication::setLayoutDirection(Qt::LeftToRight); //we test QFontComboBox because it has the specific behaviour to set a fixed size - //the the list view + //to the list view QFontComboBox combo; //the code to get the avaialbe screen space is copied from QComboBox code @@ -1911,13 +1910,17 @@ void tst_QComboBox::itemListPosition() screen = QApplication::desktop()->availableGeometry(scrNumber); #endif - combo.move(screen.width()-combo.sizeHint().width(), 0); //puts the combo the the top-right corner + combo.move(screen.width()-combo.sizeHint().width(), 0); //puts the combo to the top-right corner combo.show(); QTest::qWait(100); //wait because the window manager can move the window if there is a right panel combo.showPopup(); QTest::qWait(100); +#if defined(Q_WS_S60) + // Assuming that QtS60 style is used, here. But other ones would certainly also fail + QEXPECT_FAIL("", "QtS60Style does not yet position the combobox popup correctly", Continue); +#endif QVERIFY( combo.view()->window()->x() + combo.view()->window()->width() <= screen.x() + screen.width() ); } |