From a2643e2b17bb2f36a8894a1af116ac7ba9a064e3 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Tue, 3 Sep 2013 09:44:57 +0300 Subject: [PATCH] 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 --- .../kernel/qguivariant/test/tst_qguivariant.cpp | 14 +++++++++++--- 1 file 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) \ { \