summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-09-20 15:35:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-13 05:51:19 +0200
commit6b04ee10e6a17999679de86e80ce66886ceab963 (patch)
treea939a0c9466e90d19ffeffc76bbd592ae2d3489a /tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
parentdc0d5bf387a0b440c74b9e822c46b09e20e00720 (diff)
Auto tests: revise cursor dependant tests
Cursor dependant auto tests are currently skipped in various ways. Some are checking PlatformQuirks::haveMouseCursor() that tries to detect if the desktop environment is MeeGo, using obsolete Q_WS_X11. Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and some are actually missing the approriate guards. => unify by defining QTEST_NO_CURSOR in qtest-config.h when appropriate ie. for platforms that have no regular mouse cursor support or when QT_NO_CURSOR is defined. Task-number: QTBUG-22551 Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 9ea8589e76..abb979c76c 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -71,6 +71,7 @@
#include <qpa/qwindowsysteminterface.h>
+#include "../../../qtest-config.h"
QT_BEGIN_NAMESPACE
static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
@@ -2231,7 +2232,9 @@ Q_GLOBAL_STATIC(QPixmap, tst_qapp_pixmap);
Q_GLOBAL_STATIC(QFont, tst_qapp_font);
Q_GLOBAL_STATIC(QRegion, tst_qapp_region);
Q_GLOBAL_STATIC(QFontDatabase, tst_qapp_fontDatabase);
+#ifndef QTEST_NO_CURSOR
Q_GLOBAL_STATIC(QCursor, tst_qapp_cursor);
+#endif
void tst_QApplication::globalStaticObjectDestruction()
{
@@ -2250,7 +2253,9 @@ void tst_QApplication::globalStaticObjectDestruction()
QVERIFY(tst_qapp_font());
QVERIFY(tst_qapp_region());
QVERIFY(tst_qapp_fontDatabase());
+#ifndef QTEST_NO_CURSOR
QVERIFY(tst_qapp_cursor());
+#endif
}
//QTEST_APPLESS_MAIN(tst_QApplication)