summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-08 14:49:37 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 21:03:30 +0200
commit9c5e63ceb3048503d1b0b87916aae011b9b79ccf (patch)
treece48a0dede8ee283e7ee31ef7b4ad2bc3e484a37 /tests/auto/testlib
parentbc92ca1860c575863466e5eeef6b253690515824 (diff)
support building with -no-gui
Change-Id: I1c418e2aa6c01dbc40156a3494a7f7ddc95beca3 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/cmptest/cmptest.pro3
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp6
2 files changed, 8 insertions, 1 deletions
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 <QtCore/QCoreApplication>
#include <QtTest/QtTest>
+#ifdef QT_GUI_LIB
#include <QtGui/QImage>
#include <QtGui/QPixmap>
+#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<QPixmap>("opA");
@@ -374,6 +379,7 @@ void tst_Cmptest::compareQImages()
QCOMPARE(opA, opB);
}
+#endif
QTEST_MAIN(tst_Cmptest)
#include "tst_cmptest.moc"