summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-15 11:36:18 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-18 01:51:57 +0100
commita8fd0c3654f8352773638633778cd8003680cbc7 (patch)
tree4815cca9daf879b96a92a3de95621b56ac5ba868 /tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
parentd90d57bb8b995c7a66e7f9b7b2515447fbe11de0 (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/widgets/widgets/qmainwindow/tst_qmainwindow.cpp')
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 85bb481449..952078c0ff 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -75,9 +75,7 @@ private slots:
void constructor();
void iconSize();
void toolButtonStyle();
-#ifndef Q_WS_WINCE_WM
void menuBar();
-#endif
void statusBar();
void centralWidget();
void corner();
@@ -105,9 +103,7 @@ private slots:
void centralWidgetSize();
void dockWidgetSize();
void QTBUG2774_stylechange();
-#ifdef Q_OS_MAC
void toggleUnifiedTitleAndToolBarOnMac();
-#endif
};
// Testing get/set functions
@@ -530,8 +526,6 @@ void tst_QMainWindow::toolButtonStyle()
}
}
-// With native menubar integration on Windows Mobile the menubar is not a child
-#ifndef Q_WS_WINCE_WM
void tst_QMainWindow::menuBar()
{
{
@@ -547,6 +541,9 @@ void tst_QMainWindow::menuBar()
mw.setMenuBar(mb1);
QVERIFY(mw.menuBar() != 0);
QCOMPARE(mw.menuBar(), (QMenuBar *)mb1);
+#ifdef Q_WS_WINCE_WM
+ QSKIP("With native menubar integration the menubar is not a child");
+#endif
QCOMPARE(mb1->parentWidget(), (QWidget *)&mw);
mw.setMenuBar(0);
@@ -615,7 +612,6 @@ void tst_QMainWindow::menuBar()
QVERIFY(!topRightCornerWidget);
}
}
-#endif
void tst_QMainWindow::statusBar()
{
@@ -1712,9 +1708,9 @@ void tst_QMainWindow::QTBUG2774_stylechange()
}
}
-#ifdef Q_OS_MAC
void tst_QMainWindow::toggleUnifiedTitleAndToolBarOnMac()
{
+#ifdef Q_OS_MAC
QMainWindow mw;
QToolBar *tb = new QToolBar;
tb->addAction("Test");
@@ -1726,8 +1722,11 @@ void tst_QMainWindow::toggleUnifiedTitleAndToolBarOnMac()
QVERIFY(frameGeometry.topLeft() == mw.frameGeometry().topLeft());
mw.setUnifiedTitleAndToolBarOnMac(true);
QVERIFY(frameGeometry.topLeft() == mw.frameGeometry().topLeft());
-}
+#else
+ QSKIP("Mac specific test");
#endif
+}
+
QTEST_MAIN(tst_QMainWindow)
#include "tst_qmainwindow.moc"