summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-12-21 12:09:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-21 19:05:02 +0100
commit586adeabe4d58a7c8a71bbb1be79c3533ab858ff (patch)
tree62a13574bca965442bc1c66bd63d54550e3db7a0 /tests/auto
parent7706c31eaa686299d7e22da809fec00c0db47c86 (diff)
add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro8
-rw-r--r--tests/auto/corelib/animation/animation.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pri2
-rw-r--r--tests/auto/corelib/itemmodels/itemmodels.pro2
-rw-r--r--tests/auto/corelib/kernel/qpointer/qpointer.pro2
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro2
-rw-r--r--tests/auto/gui/image/qicon/qicon.pro2
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro2
-rw-r--r--tests/auto/gui/image/qpicture/qpicture.pro2
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro2
-rw-r--r--tests/auto/gui/itemmodels/itemmodels.pro2
-rw-r--r--tests/auto/gui/kernel/kernel.pro2
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro4
-rw-r--r--tests/auto/gui/text/qfont/qfont.pro2
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro2
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro2
-rw-r--r--tests/auto/gui/text/qtextobject/qtextobject.pro2
-rw-r--r--tests/auto/gui/text/qtexttable/qtexttable.pro2
-rw-r--r--tests/auto/opengl/qgl/qgl.pro2
-rw-r--r--tests/auto/opengl/qglbuffer/qglbuffer.pro2
-rw-r--r--tests/auto/opengl/qglfunctions/qglfunctions.pro2
-rw-r--r--tests/auto/opengl/qglthreads/qglthreads.pro2
-rw-r--r--tests/auto/other/atwrapper/atWrapper.pro2
-rw-r--r--tests/auto/other/other.pro2
-rw-r--r--tests/auto/sql/models/models.pro2
-rw-r--r--tests/auto/tools/moc/moc.pro2
-rw-r--r--tests/auto/tools/tools.pro2
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro2
28 files changed, 32 insertions, 32 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index b3906cc247..6ff0734186 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -18,7 +18,7 @@ SUBDIRS += \
wince*: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools
-isEmpty(QT.opengl.name): SUBDIRS -= opengl
-!unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus
-contains(QT_CONFIG, no-widgets): SUBDIRS -= widgets printsupport
-!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
+!qtHaveModule(opengl): SUBDIRS -= opengl
+!unix|embedded|!qtHaveModule(dbus): SUBDIRS -= dbus
+!qtHaveModule(widgets): SUBDIRS -= widgets printsupport
+!qtHaveModule(concurrent): SUBDIRS -= concurrent
diff --git a/tests/auto/corelib/animation/animation.pro b/tests/auto/corelib/animation/animation.pro
index 563b7184bf..30c98f4a11 100644
--- a/tests/auto/corelib/animation/animation.pro
+++ b/tests/auto/corelib/animation/animation.pro
@@ -8,5 +8,5 @@ SUBDIRS=\
qsequentialanimationgroup \
qvariantanimation
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qpropertyanimation
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
index d139b3dcef..430251fbf1 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pri
+++ b/tests/auto/corelib/io/qprocess/qprocess.pri
@@ -17,5 +17,5 @@ SUBPROGRAMS = \
!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
-contains(QT_CONFIG, no-widgets): SUBPROGRAMS -= \
+!qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess
diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro
index 5221bfae81..2f681c3330 100644
--- a/tests/auto/corelib/itemmodels/itemmodels.pro
+++ b/tests/auto/corelib/itemmodels/itemmodels.pro
@@ -3,7 +3,7 @@ TEMPLATE=subdirs
SUBDIRS = qabstractitemmodel \
qstringlistmodel
-!contains(QT_CONFIG, no-widgets): SUBDIRS += \
+qtHaveModule(widgets): SUBDIRS += \
qabstractproxymodel \
qidentityproxymodel \
qitemmodel \
diff --git a/tests/auto/corelib/kernel/qpointer/qpointer.pro b/tests/auto/corelib/kernel/qpointer/qpointer.pro
index 6c076e630f..8786d07292 100644
--- a/tests/auto/corelib/kernel/qpointer/qpointer.pro
+++ b/tests/auto/corelib/kernel/qpointer/qpointer.pro
@@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpointer
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES = tst_qpointer.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
index 1708735c52..b830efe3a5 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
+++ b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
@@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qstatemachine
QT = core-private testlib gui
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES = tst_qstatemachine.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro
index d4ade0e8ab..337b938915 100644
--- a/tests/auto/gui/image/qicon/qicon.pro
+++ b/tests/auto/gui/image/qicon/qicon.pro
@@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qicon
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qicon.cpp
RESOURCES = tst_qicon.qrc
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index a511f0b258..9290588625 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qmovie
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp
MOC_DIR=tmp
diff --git a/tests/auto/gui/image/qpicture/qpicture.pro b/tests/auto/gui/image/qpicture/qpicture.pro
index 8a93584aaa..b4927b4536 100644
--- a/tests/auto/gui/image/qpicture/qpicture.pro
+++ b/tests/auto/gui/image/qpicture/qpicture.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpicture
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qpicture.cpp
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro
index f079f56864..6188bf2c6e 100644
--- a/tests/auto/gui/image/qpixmap/qpixmap.pro
+++ b/tests/auto/gui/image/qpixmap/qpixmap.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qpixmap
QT += core-private gui-private testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
+qtHaveModule(widgets): QT += widgets widgets-private
SOURCES += tst_qpixmap.cpp
!wince* {
diff --git a/tests/auto/gui/itemmodels/itemmodels.pro b/tests/auto/gui/itemmodels/itemmodels.pro
index 169100f486..8a300d0210 100644
--- a/tests/auto/gui/itemmodels/itemmodels.pro
+++ b/tests/auto/gui/itemmodels/itemmodels.pro
@@ -3,5 +3,5 @@ SUBDIRS= \
qstandarditem \
qstandarditemmodel
-isEmpty(QT.widgets.name):SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qstandarditemmodel
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index fb8cd2d566..7e3f25d377 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -19,6 +19,6 @@ SUBDIRS=\
qwindow \
qguiapplication \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
qtouchevent
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index 90a801ecb3..a30564cc50 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -3,8 +3,8 @@ CONFIG += parallel_test
TARGET = tst_qpainter
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
-!contains(QT_CONFIG, no-widgets):!wince*: QT += printsupport
+qtHaveModule(widgets): QT += widgets widgets-private
+qtHaveModule(widgets):!wince*: QT += printsupport
SOURCES += tst_qpainter.cpp
diff --git a/tests/auto/gui/text/qfont/qfont.pro b/tests/auto/gui/text/qfont/qfont.pro
index 562294dd66..ced66c226c 100644
--- a/tests/auto/gui/text/qfont/qfont.pro
+++ b/tests/auto/gui/text/qfont/qfont.pro
@@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qfont
QT += testlib
QT += core-private gui-private
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
index c8db4df90e..24b58c7d3e 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
+++ b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
@@ -3,5 +3,5 @@ CONFIG += parallel_test
TARGET = tst_qsyntaxhighlighter
SOURCES += tst_qsyntaxhighlighter.cpp
QT += testlib
-!contains(QT_CONFIG, no-widgets) QT += widgets
+qtHaveModule(widgets) QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
index d439e0deb9..76dd370a8d 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
+++ b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextdocumentlayout
QT += testlib
-!contains(QT_CONFIG, no-widgets) QT += widgets
+qtHaveModule(widgets) QT += widgets
SOURCES += tst_qtextdocumentlayout.cpp
diff --git a/tests/auto/gui/text/qtextobject/qtextobject.pro b/tests/auto/gui/text/qtextobject/qtextobject.pro
index 59312ac1d5..ebeba2a64a 100644
--- a/tests/auto/gui/text/qtextobject/qtextobject.pro
+++ b/tests/auto/gui/text/qtextobject/qtextobject.pro
@@ -6,7 +6,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextobject
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtextobject.cpp
diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro
index a1034dac67..1c59bf1471 100644
--- a/tests/auto/gui/text/qtexttable/qtexttable.pro
+++ b/tests/auto/gui/text/qtexttable/qtexttable.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtexttable
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtexttable.cpp
diff --git a/tests/auto/opengl/qgl/qgl.pro b/tests/auto/opengl/qgl/qgl.pro
index e5aff000ac..311e41a624 100644
--- a/tests/auto/opengl/qgl/qgl.pro
+++ b/tests/auto/opengl/qgl/qgl.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qgl
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += widgets widgets-private opengl-private gui-private core-private testlib
SOURCES += tst_qgl.cpp
diff --git a/tests/auto/opengl/qglbuffer/qglbuffer.pro b/tests/auto/opengl/qglbuffer/qglbuffer.pro
index 4d102415a8..72117322da 100644
--- a/tests/auto/opengl/qglbuffer/qglbuffer.pro
+++ b/tests/auto/opengl/qglbuffer/qglbuffer.pro
@@ -5,7 +5,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglbuffer
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglbuffer.cpp
diff --git a/tests/auto/opengl/qglfunctions/qglfunctions.pro b/tests/auto/opengl/qglfunctions/qglfunctions.pro
index 321f62534e..a512ea0dd9 100644
--- a/tests/auto/opengl/qglfunctions/qglfunctions.pro
+++ b/tests/auto/opengl/qglfunctions/qglfunctions.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglfunctions
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglfunctions.cpp
diff --git a/tests/auto/opengl/qglthreads/qglthreads.pro b/tests/auto/opengl/qglthreads/qglthreads.pro
index d5cbd0d9ed..3502c41c87 100644
--- a/tests/auto/opengl/qglthreads/qglthreads.pro
+++ b/tests/auto/opengl/qglthreads/qglthreads.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qglthreads
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib gui-private core-private
HEADERS += tst_qglthreads.h
diff --git a/tests/auto/other/atwrapper/atWrapper.pro b/tests/auto/other/atwrapper/atWrapper.pro
index d14293302e..1617ae89d1 100644
--- a/tests/auto/other/atwrapper/atWrapper.pro
+++ b/tests/auto/other/atwrapper/atWrapper.pro
@@ -6,7 +6,7 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += xml svg network testlib
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
include($$ARTHUR/datagenerator/datagenerator.pri)
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index eb6ed667a8..ea6290db42 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -26,7 +26,7 @@ SUBDIRS=\
qtokenautomaton \
windowsmobile \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
baselineexample \
gestures \
headersclean \
diff --git a/tests/auto/sql/models/models.pro b/tests/auto/sql/models/models.pro
index c00ec2c935..2c3ae4ef0a 100644
--- a/tests/auto/sql/models/models.pro
+++ b/tests/auto/sql/models/models.pro
@@ -4,5 +4,5 @@ SUBDIRS=\
qsqlrelationaltablemodel \
qsqltablemodel \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qsqlquerymodel
diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
index d91ae378da..772086d3c4 100644
--- a/tests/auto/tools/moc/moc.pro
+++ b/tests/auto/tools/moc/moc.pro
@@ -31,7 +31,7 @@ SOURCES += tst_moc.cpp
QT -= gui
QT += sql network testlib
-contains(QT_CONFIG, dbus){
+qtHaveModule(dbus) {
DEFINES += WITH_DBUS
QT += dbus
}
diff --git a/tests/auto/tools/tools.pro b/tests/auto/tools/tools.pro
index 4cc3d62a43..9b4d2ca22a 100644
--- a/tests/auto/tools/tools.pro
+++ b/tests/auto/tools/tools.pro
@@ -5,4 +5,4 @@ SUBDIRS=\
moc \
rcc \
-contains(QT_CONFIG, dbus):SUBDIRS += qdbuscpp2xml qdbusxml2cpp
+qtHaveModule(dbus): SUBDIRS += qdbuscpp2xml qdbusxml2cpp
diff --git a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
index 141392b251..cc2bcb3c30 100644
--- a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
+++ b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
@@ -6,7 +6,7 @@ QT += gui-private widgets testlib
INCLUDEPATH += .
SOURCES += tst_qmdiarea.cpp
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
mac {
LIBS += -framework Security