summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcombobox
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:45:38 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:46:19 +0200
commitd671acd5b296b83440db9836a92189c501c87ff3 (patch)
treebd9c1a000e17c70124c207666cfb3276b5518ffd /tests/auto/qcombobox
parent42f5786104f9eef9542df2c7469a03324978281d (diff)
parent4f2138ecfbdc58e5cb5b0c7d762197ef69752957 (diff)
Merge remote branch 'staging/master' into refactor
Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/glxconvenience/qglxconvenience.cpp src/plugins/platforms/platforms.pro src/plugins/platforms/wayland/qwaylandwindow.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/plugins/platforms/xcb/qxcbwindowsurface.cpp src/widgets/kernel/qwidget_qpa.cpp tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'tests/auto/qcombobox')
-rw-r--r--tests/auto/qcombobox/qcombobox.pro1
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp24
2 files changed, 6 insertions, 19 deletions
diff --git a/tests/auto/qcombobox/qcombobox.pro b/tests/auto/qcombobox/qcombobox.pro
index 2ac5c7c53b..a8f0e6ad23 100644
--- a/tests/auto/qcombobox/qcombobox.pro
+++ b/tests/auto/qcombobox/qcombobox.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
+QT += gui-private core-private
SOURCES += tst_qcombobox.cpp
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index d525068893..33a630076e 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -1230,21 +1230,17 @@ void tst_QComboBox::insertItem_data()
QTest::addColumn<int>("insertIndex");
QTest::addColumn<QString>("itemLabel");
QTest::addColumn<int>("expectedIndex");
- QTest::addColumn<bool>("testQt3Support");
QTest::addColumn<bool>("editable");
QStringList initialItems;
initialItems << "foo" << "bar";
for(int e = 0 ; e<2 ; e++) {
bool editable = (e==0);
- QTest::newRow("Insert less then 0") << initialItems << -1 << "inserted" << 0 << false << editable;
- QTest::newRow("Insert at 0") << initialItems << 0 << "inserted" << 0 << false << editable;
- QTest::newRow("Insert beyond count") << initialItems << 3 << "inserted" << 2 << false << editable;
- QTest::newRow("Insert at count") << initialItems << 2 << "inserted" << 2 << false << editable;
- QTest::newRow("Insert in the middle") << initialItems << 1 << "inserted" << 1 << false << editable;
-#if defined(QT3_SUPPORT)
- QTest::newRow("Qt3Support: Insert less then 0") << initialItems << -1 << "inserted" << 2 << true << editable;
-#endif
+ QTest::newRow("Insert less then 0") << initialItems << -1 << "inserted" << 0 << editable;
+ QTest::newRow("Insert at 0") << initialItems << 0 << "inserted" << 0 << editable;
+ QTest::newRow("Insert beyond count") << initialItems << 3 << "inserted" << 2 << editable;
+ QTest::newRow("Insert at count") << initialItems << 2 << "inserted" << 2 << editable;
+ QTest::newRow("Insert in the middle") << initialItems << 1 << "inserted" << 1 << editable;
}
}
@@ -1254,7 +1250,6 @@ void tst_QComboBox::insertItem()
QFETCH(int, insertIndex);
QFETCH(QString, itemLabel);
QFETCH(int, expectedIndex);
- QFETCH(bool, testQt3Support);
QFETCH(bool, editable);
testWidget->insertItems(0, initialItems);
@@ -1263,16 +1258,7 @@ void tst_QComboBox::insertItem()
testWidget->setEditable(true);
if (editable)
testWidget->setEditText("FOO");
-#if defined (QT3_SUPPORT)
- if (testQt3Support)
- testWidget->insertItem(itemLabel, insertIndex);
- else
- testWidget->insertItem(insertIndex, itemLabel);
-#else
- Q_UNUSED(testQt3Support);
testWidget->insertItem(insertIndex, itemLabel);
-#endif
-
QCOMPARE(testWidget->count(), initialItems.count() + 1);
QCOMPARE(testWidget->itemText(expectedIndex), itemLabel);