diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-11-15 11:36:18 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-18 01:51:57 +0100 |
commit | a8fd0c3654f8352773638633778cd8003680cbc7 (patch) | |
tree | 4815cca9daf879b96a92a3de95621b56ac5ba868 /tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp | |
parent | d90d57bb8b995c7a66e7f9b7b2515447fbe11de0 (diff) |
Don't depend on moc to disable test functions.
The moc tool is not aware of all defines (particularly those that are
compiler builtins) and does not correctly evaluate others that depend
on compiler builtins, such as Q_OS_FOO.
This commit reverts parts of the following commits, but is not a
complete fix as there were many instances of this problem in the tests
prior to those commits:
924d810dbdcd5b5b0fa860922b2487ea9062d002
8aaff6751038b88d17e23be6fcee945771297c5b
338d3f11973412047c2c9cd41cbd0c961d738ef3
a55034062ba2bf73a9f1ed3d9cf31745b38149e3
253497b7446c7d723aa3bdd7152e25d6852f2604
7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6
9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f
0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b
Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp')
-rw-r--r-- | tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp b/tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp index 6f41bc0f61..9b2d015005 100644 --- a/tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/integrationtests/qaccessibility/tst_qaccessibility.cpp @@ -247,18 +247,14 @@ private slots: void abstractScrollAreaTest(); void scrollAreaTest(); - // Accessible table1 interface is no longer supported on X11, - // where it has been replaced by table2 interface. -#ifndef Q_OS_UNIX void listViewTest(); void treeWidgetTest(); void tableWidgetTest(); void tableViewTest(); -#else + void table2ListTest(); void table2TreeTest(); void table2TableTest(); -#endif void calendarWidgetTest(); void dockWidgetTest(); @@ -2469,12 +2465,11 @@ void tst_QAccessibility::scrollAreaTest() QTestAccessibility::clearEvents(); } -// Accessible table1 interface is no longer supported on X11, -// where it has been replaced by table2 interface. -#ifndef Q_OS_UNIX - void tst_QAccessibility::listViewTest() { +#if defined(Q_OS_UNIX) + QSKIP( "Accessible table1 interface is no longer supported on X11."); +#else { QListView listView; QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&listView); @@ -2535,10 +2530,14 @@ void tst_QAccessibility::listViewTest() delete iface; } QTestAccessibility::clearEvents(); +#endif } void tst_QAccessibility::treeWidgetTest() { +#if defined(Q_OS_UNIX) + QSKIP( "Accessible table1 interface is no longer supported on X11."); +#else QWidget *w = new QWidget; QTreeWidget *tree = new QTreeWidget(w); QHBoxLayout *l = new QHBoxLayout(w); @@ -2591,10 +2590,14 @@ void tst_QAccessibility::treeWidgetTest() delete w; QTestAccessibility::clearEvents(); +#endif } void tst_QAccessibility::tableWidgetTest() { +#if defined(Q_OS_UNIX) + QSKIP( "Accessible table1 interface is no longer supported on X11."); +#else { QWidget *topLevel = new QWidget; QTableWidget *w = new QTableWidget(8,4,topLevel); @@ -2631,6 +2634,7 @@ void tst_QAccessibility::tableWidgetTest() delete topLevel; } QTestAccessibility::clearEvents(); +#endif } class QtTestTableModel: public QAbstractTableModel @@ -2713,6 +2717,9 @@ public: void tst_QAccessibility::tableViewTest() { +#if defined(Q_OS_UNIX) + QSKIP( "Accessible table1 interface is no longer supported on X11."); +#else { QtTestTableModel *model = new QtTestTableModel(3, 4); QTableView *w = new QTableView(); @@ -2789,13 +2796,14 @@ void tst_QAccessibility::tableViewTest() delete model; } QTestAccessibility::clearEvents(); +#endif } -#else -// Test accessible table2 interface on unix - void tst_QAccessibility::table2ListTest() { +#if !defined(Q_OS_UNIX) + QSKIP( "Accessible table2 interface is currently only supported on X11."); +#else QListWidget *listView = new QListWidget; listView->addItem("Oslo"); listView->addItem("Berlin"); @@ -2867,10 +2875,14 @@ void tst_QAccessibility::table2ListTest() delete iface; delete listView; QTestAccessibility::clearEvents(); +#endif } void tst_QAccessibility::table2TreeTest() { +#if !defined(Q_OS_UNIX) + QSKIP( "Accessible table2 interface is currently only supported on X11."); +#else QTreeWidget *treeView = new QTreeWidget; treeView->setColumnCount(2); QTreeWidgetItem *header = new QTreeWidgetItem; @@ -2986,10 +2998,14 @@ void tst_QAccessibility::table2TreeTest() delete iface; QTestAccessibility::clearEvents(); +#endif } void tst_QAccessibility::table2TableTest() { +#if !defined(Q_OS_UNIX) + QSKIP( "Accessible table2 interface is currently only supported on X11."); +#else QTableWidget *tableView = new QTableWidget(3, 3); tableView->setColumnCount(3); QStringList hHeader; @@ -3089,8 +3105,8 @@ void tst_QAccessibility::table2TableTest() delete tableView; QTestAccessibility::clearEvents(); -} #endif +} void tst_QAccessibility::calendarWidgetTest() { |