From 9c5e63ceb3048503d1b0b87916aae011b9b79ccf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 8 Oct 2013 14:49:37 +0200 Subject: support building with -no-gui Change-Id: I1c418e2aa6c01dbc40156a3494a7f7ddc95beca3 Reviewed-by: Sergio Ahumada Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/cmptest/cmptest.pro | 3 ++- tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/auto/testlib/selftests') diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro index a793c203dd..2d5dd071a9 100644 --- a/tests/auto/testlib/selftests/cmptest/cmptest.pro +++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro @@ -1,5 +1,6 @@ SOURCES += tst_cmptest.cpp -QT = core gui testlib +QT = core testlib +qtHaveModule(gui): QT += gui mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp index e9ad1778fa..9f8343b57a 100644 --- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp +++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp @@ -42,8 +42,10 @@ #include #include +#ifdef QT_GUI_LIB #include #include +#endif /* XPM test data for QPixmap, QImage tests (use drag cursors as example) */ @@ -138,10 +140,12 @@ private slots: void compareQStringLists_data(); void compareQListInt(); void compareQListDouble(); +#ifdef QT_GUI_LIB void compareQPixmaps(); void compareQPixmaps_data(); void compareQImages(); void compareQImages_data(); +#endif }; static bool boolfunc() { return true; } @@ -323,6 +327,7 @@ void tst_Cmptest::compareQListDouble() QCOMPARE(double1, double2); } +#ifdef QT_GUI_LIB void tst_Cmptest::compareQPixmaps_data() { QTest::addColumn("opA"); @@ -374,6 +379,7 @@ void tst_Cmptest::compareQImages() QCOMPARE(opA, opB); } +#endif QTEST_MAIN(tst_Cmptest) #include "tst_cmptest.moc" -- cgit v1.2.3