summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-09-03 09:44:57 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-03 12:05:59 +0200
commita2643e2b17bb2f36a8894a1af116ac7ba9a064e3 (patch)
treefb157e6bf3595bf24b437463c359e97f8654f564 /tests/auto/gui
parentcd582f841076010dac334427830763838c0996b8 (diff)
Fix test compilation when QT_NO_CURSOR is defined
The implicitConstruction() test case will fail to compile if QCursor is unavailable. Change-Id: If26743995505a48da648a2fa2a498debec91c933 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
index 75aed3bf8b..6fdf3dc843 100644
--- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
@@ -636,7 +636,7 @@ void tst_QGuiVariant::implicitConstruction()
// This is a compile-time test
QVariant v;
-#define FOR_EACH_GUI_CLASS(F) \
+#define FOR_EACH_GUI_CLASS_BASE(F) \
F(Font) \
F(Pixmap) \
F(Brush) \
@@ -647,7 +647,6 @@ void tst_QGuiVariant::implicitConstruction()
F(Polygon) \
F(Region) \
F(Bitmap) \
- F(Cursor) \
F(KeySequence) \
F(Pen) \
F(TextLength) \
@@ -659,7 +658,16 @@ void tst_QGuiVariant::implicitConstruction()
F(Vector3D) \
F(Vector4D) \
F(Quaternion) \
- F(PolygonF) \
+ F(PolygonF)
+
+#ifndef QTEST_NO_CURSOR
+# define FOR_EACH_GUI_CLASS(F) \
+ FOR_EACH_GUI_CLASS_BASE(F) \
+ F(Cursor)
+#else // !QTEST_NO_CURSOR
+# define FOR_EACH_GUI_CLASS(F) \
+ FOR_EACH_GUI_CLASS_BASE(F)
+#endif // QTEST_NO_CURSOR
#define CONSTRUCT(TYPE) \
{ \