Fix QtGui dependencies in tests/benchmarks

Before this change, -no-gui builds failed already while running qmake.

Change-Id: I3e300a16669371098589822806c5cf8aa9b801c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Kai Pastor 2016-03-25 22:26:36 +01:00
parent fc65b9a7cb
commit f805d7075a
5 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
QT += testlib QT = core testlib
TEMPLATE = app TEMPLATE = app
TARGET = tst_bench_qcoreapplication TARGET = tst_bench_qcoreapplication

View File

@ -1,5 +1,6 @@
TARGET = tst_bench_qvariant TARGET = tst_bench_qvariant
QT += testlib QT += testlib
!qtHaveModule(gui): QT -= gui
CONFIG += release CONFIG += release
#CONFIG += debug #CONFIG += debug

View File

@ -32,7 +32,9 @@
****************************************************************************/ ****************************************************************************/
#include <QtCore> #include <QtCore>
#ifdef QT_GUI_LIB
# include <QtGui/QPixmap> # include <QtGui/QPixmap>
#endif
#include <qtest.h> #include <qtest.h>
#define ITERATION_COUNT 1e5 #define ITERATION_COUNT 1e5
@ -47,7 +49,9 @@ private slots:
void floatVariantCreation(); void floatVariantCreation();
void rectVariantCreation(); void rectVariantCreation();
void stringVariantCreation(); void stringVariantCreation();
#ifdef QT_GUI_LIB
void pixmapVariantCreation(); void pixmapVariantCreation();
#endif
void stringListVariantCreation(); void stringListVariantCreation();
void bigClassVariantCreation(); void bigClassVariantCreation();
void smallClassVariantCreation(); void smallClassVariantCreation();
@ -158,10 +162,12 @@ void tst_qvariant::stringVariantCreation()
variantCreation<QString>(QString()); variantCreation<QString>(QString());
} }
#ifdef QT_GUI_LIB
void tst_qvariant::pixmapVariantCreation() void tst_qvariant::pixmapVariantCreation()
{ {
variantCreation<QPixmap>(QPixmap()); variantCreation<QPixmap>(QPixmap());
} }
#endif
void tst_qvariant::stringListVariantCreation() void tst_qvariant::stringListVariantCreation()
{ {

View File

@ -1,8 +1,7 @@
TEMPLATE = app TEMPLATE = app
TARGET = tst_bench_qnetworkdiskcache TARGET = tst_bench_qnetworkdiskcache
QT += gui # for QDesktopServices QT = core network testlib
QT += network testlib
CONFIG += release CONFIG += release

View File

@ -1,3 +1,3 @@
TARGET = tst_bench_qnetworkreply_from_cache TARGET = tst_bench_qnetworkreply_from_cache
QT += network testlib QT = core network testlib
SOURCES += tst_qnetworkreply_from_cache.cpp SOURCES += tst_qnetworkreply_from_cache.cpp