diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-17 13:43:30 +1000 |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-18 16:09:29 +1000 |
commit | 49babe02f0a00fe2baff3950fbdcb725ce20d772 (patch) | |
tree | e0383c879f78ef74ba7a0fe394504c096312edf4 /tests/auto/qmenu | |
parent | 0cd93933d8e5cc69151958fc285936854ff86e47 (diff) |
Remove autotest code for Qt3Support library.
This commit deals with the simple cases -- mostly just removing blocks
of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with
the trickier cases.
Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qmenu')
-rw-r--r-- | tests/auto/qmenu/tst_qmenu.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index c31361d60a..4845077cde 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -90,10 +90,6 @@ private slots: void tearOff(); void layoutDirection(); -#if defined(QT3_SUPPORT) - void indexBasedInsertion_data(); - void indexBasedInsertion(); -#endif void task208001_stylesheet(); void activeSubMenuPosition(); void task242454_sizeHint(); @@ -641,49 +637,6 @@ void tst_QMenu::layoutDirection() QCOMPARE(menu.layoutDirection(), Qt::RightToLeft); } - - -#if defined(QT3_SUPPORT) -void tst_QMenu::indexBasedInsertion_data() -{ - QTest::addColumn<int>("indexForInsertion"); - QTest::addColumn<int>("expectedIndex"); - - QTest::newRow("negative-index-appends") << -1 << 1; - QTest::newRow("prepend") << 0 << 0; - QTest::newRow("append") << 1 << 1; -} - -void tst_QMenu::indexBasedInsertion() -{ - // test the compat'ed index based insertion - - QFETCH(int, indexForInsertion); - QFETCH(int, expectedIndex); - - { - QMenu menu; - menu.addAction("Regular Item"); - - menu.insertItem("New Item", -1 /*id*/, indexForInsertion); - - QAction *act = menu.actions().value(expectedIndex); - QVERIFY(act); - QCOMPARE(act->text(), QString("New Item")); - } - { - QMenu menu; - menu.addAction("Regular Item"); - - menu.insertSeparator(indexForInsertion); - - QAction *act = menu.actions().value(expectedIndex); - QVERIFY(act); - QVERIFY(act->isSeparator()); - } -} -#endif - void tst_QMenu::task208001_stylesheet() { //test if it crash |