From 6b04ee10e6a17999679de86e80ce66886ceab963 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 20 Sep 2012 15:35:21 +0200 Subject: 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 Reviewed-by: Marc Mutz Reviewed-by: Caroline Chao --- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto/widgets/kernel/qapplication') 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 +#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) -- cgit v1.2.3