support building with -no-gui

Change-Id: I1c418e2aa6c01dbc40156a3494a7f7ddc95beca3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This commit is contained in:
Oswald Buddenhagen 2013-10-08 14:49:37 +02:00 committed by The Qt Project
parent bc92ca1860
commit 9c5e63ceb3
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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"