From 586adeabe4d58a7c8a71bbb1be79c3533ab858ff Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 21 Dec 2012 12:09:56 +0100 Subject: 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 Reviewed-by: Tasuku Suzuki Reviewed-by: Oswald Buddenhagen --- tests/auto/auto.pro | 8 ++++---- tests/auto/corelib/animation/animation.pro | 2 +- tests/auto/corelib/io/qprocess/qprocess.pri | 2 +- tests/auto/corelib/itemmodels/itemmodels.pro | 2 +- tests/auto/corelib/kernel/qpointer/qpointer.pro | 2 +- tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro | 2 +- tests/auto/gui/image/qicon/qicon.pro | 2 +- tests/auto/gui/image/qmovie/qmovie.pro | 2 +- tests/auto/gui/image/qpicture/qpicture.pro | 2 +- tests/auto/gui/image/qpixmap/qpixmap.pro | 2 +- tests/auto/gui/itemmodels/itemmodels.pro | 2 +- tests/auto/gui/kernel/kernel.pro | 2 +- tests/auto/gui/painting/qpainter/qpainter.pro | 4 ++-- tests/auto/gui/text/qfont/qfont.pro | 2 +- tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro | 2 +- tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro | 2 +- tests/auto/gui/text/qtextobject/qtextobject.pro | 2 +- tests/auto/gui/text/qtexttable/qtexttable.pro | 2 +- tests/auto/opengl/qgl/qgl.pro | 2 +- tests/auto/opengl/qglbuffer/qglbuffer.pro | 2 +- tests/auto/opengl/qglfunctions/qglfunctions.pro | 2 +- tests/auto/opengl/qglthreads/qglthreads.pro | 2 +- tests/auto/other/atwrapper/atWrapper.pro | 2 +- tests/auto/other/other.pro | 2 +- tests/auto/sql/models/models.pro | 2 +- tests/auto/tools/moc/moc.pro | 2 +- tests/auto/tools/tools.pro | 2 +- tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro | 2 +- tests/benchmarks/benchmarks.pro | 4 ++-- tests/benchmarks/corelib/kernel/kernel.pro | 2 +- tests/benchmarks/corelib/tools/qregexp/qregexp.pro | 2 +- tests/benchmarks/gui/animation/animation.pro | 2 +- .../functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro | 2 +- tests/benchmarks/gui/graphicsview/graphicsview.pro | 2 +- .../gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro | 2 +- .../gui/graphicsview/qgraphicsview/chiptester/chiptester.pri | 2 +- tests/benchmarks/gui/gui.pro | 2 +- tests/benchmarks/gui/image/image.pro | 2 +- tests/benchmarks/gui/kernel/kernel.pro | 2 +- tests/benchmarks/gui/painting/painting.pro | 2 +- tests/benchmarks/gui/styles/styles.pro | 2 +- tests/manual/lance/lance.pro | 2 +- 42 files changed, 47 insertions(+), 47 deletions(-) (limited to 'tests') 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 diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index e685c3d7b2..5fd8ff6368 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -5,8 +5,8 @@ SUBDIRS = \ network \ sql \ -# removed-by-refactor contains(QT_CONFIG, opengl): SUBDIRS += opengl -contains(QT_CONFIG, dbus): SUBDIRS += dbus +# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl +qtHaveModule(dbus): SUBDIRS += dbus check-trusted.CONFIG += recursive QMAKE_EXTRA_TARGETS += check-trusted diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro index a55135b74d..02eeeaa254 100644 --- a/tests/benchmarks/corelib/kernel/kernel.pro +++ b/tests/benchmarks/corelib/kernel/kernel.pro @@ -7,6 +7,6 @@ SUBDIRS = \ qvariant \ qcoreapplication -isEmpty(QT.widgets.name): SUBDIRS -= \ +!qtHaveModule(widgets): SUBDIRS -= \ qmetaobject \ qobject diff --git a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro index ef50a22d4d..74544519f3 100644 --- a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro +++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro @@ -6,7 +6,7 @@ CONFIG += release exceptions SOURCES += main.cpp RESOURCES += qregexp.qrc -!isEmpty(QT.script.name):!pcre { +qtHaveModule(script):!pcre { DEFINES += HAVE_JSC QT += script } diff --git a/tests/benchmarks/gui/animation/animation.pro b/tests/benchmarks/gui/animation/animation.pro index 1c9a7c3c08..76c1a49e5c 100644 --- a/tests/benchmarks/gui/animation/animation.pro +++ b/tests/benchmarks/gui/animation/animation.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -!isEmpty(QT.widgets.name):SUBDIRS = qanimation +qtHaveModule(widgets): SUBDIRS = qanimation diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro index b0bc021b0a..a6ed4b84fb 100644 --- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro +++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro @@ -1,7 +1,7 @@ TEMPLATE = app QT += svg testlib -contains(QT_CONFIG, opengl):QT += opengl +qtHaveModule(opengl): QT += opengl HEADERS += widgets/gvbwidget.h \ widgets/abstractscrollarea.h \ diff --git a/tests/benchmarks/gui/graphicsview/graphicsview.pro b/tests/benchmarks/gui/graphicsview/graphicsview.pro index f8ba062829..d89a00c4b9 100644 --- a/tests/benchmarks/gui/graphicsview/graphicsview.pro +++ b/tests/benchmarks/gui/graphicsview/graphicsview.pro @@ -8,7 +8,7 @@ SUBDIRS = \ qgraphicsview \ qgraphicswidget -isEmpty(QT.widgets.name): SUBDIRS -= \ +!qtHaveModule(widgets): SUBDIRS -= \ qgraphicsanchorlayout \ qgraphicsitem \ qgraphicsscene \ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro index 759216d46d..4047bad1ca 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro @@ -4,7 +4,7 @@ HEADERS += mainwindow.h view.h chip.h SOURCES += main.cpp SOURCES += mainwindow.cpp view.cpp chip.cpp -contains(QT_CONFIG, opengl):QT += opengl +qtHaveModule(opengl): QT += opengl build_all:!build_pass { CONFIG -= build_all diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri index 8d02504b73..105117de30 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri @@ -10,4 +10,4 @@ RESOURCES += \ chiptester/images.qrc QT += widgets -contains(QT_CONFIG, opengl) QT += opengl +qtHaveModule(opengl): QT += opengl diff --git a/tests/benchmarks/gui/gui.pro b/tests/benchmarks/gui/gui.pro index f4b84f0428..e943347938 100644 --- a/tests/benchmarks/gui/gui.pro +++ b/tests/benchmarks/gui/gui.pro @@ -17,5 +17,5 @@ TRUSTED_BENCHMARKS += \ include(../trusted-benchmarks.pri) -isEmpty(QT.widgets.name): SUBDIRS -= \ +!qtHaveModule(widgets): SUBDIRS -= \ itemviews diff --git a/tests/benchmarks/gui/image/image.pro b/tests/benchmarks/gui/image/image.pro index fa26f3ec4c..2d5db35a73 100644 --- a/tests/benchmarks/gui/image/image.pro +++ b/tests/benchmarks/gui/image/image.pro @@ -6,5 +6,5 @@ SUBDIRS = \ qpixmap \ qpixmapcache -isEmpty(QT.widgets.name): SUBDIRS -= \ +!qtHaveModule(widgets): SUBDIRS -= \ qimagereader diff --git a/tests/benchmarks/gui/kernel/kernel.pro b/tests/benchmarks/gui/kernel/kernel.pro index 303eff9759..cd7235cff8 100644 --- a/tests/benchmarks/gui/kernel/kernel.pro +++ b/tests/benchmarks/gui/kernel/kernel.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs -!isEmpty(QT.widgets.name):SUBDIRS = \ +qtHaveModule(widgets): SUBDIRS = \ qapplication \ qwidget diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro index e55222a2c2..b3fb34757c 100644 --- a/tests/benchmarks/gui/painting/painting.pro +++ b/tests/benchmarks/gui/painting/painting.pro @@ -6,7 +6,7 @@ SUBDIRS = \ qtracebench \ qtbench -isEmpty(QT.widgets.name): SUBDIRS -= \ +!qtHaveModule(widgets): SUBDIRS -= \ qpainter \ qtracebench \ qtbench diff --git a/tests/benchmarks/gui/styles/styles.pro b/tests/benchmarks/gui/styles/styles.pro index 8930de127b..2c1d10b48c 100644 --- a/tests/benchmarks/gui/styles/styles.pro +++ b/tests/benchmarks/gui/styles/styles.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -!isEmpty(QT.widgets.name):SUBDIRS = \ +qtHaveModule(widgets): SUBDIRS = \ qstylesheetstyle diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro index 6d1d7fa392..177ca0e40e 100644 --- a/tests/manual/lance/lance.pro +++ b/tests/manual/lance/lance.pro @@ -13,6 +13,6 @@ SOURCES += interactivewidget.cpp \ RESOURCES += icons.qrc \ $$LANCELOT_DIR/images.qrc -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl +qtHaveModule(opengl): QT += opengl DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 -- cgit v1.2.3