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>
This commit is contained in:
Oswald Buddenhagen 2012-12-21 12:09:56 +01:00 committed by The Qt Project
parent 7706c31eaa
commit 586adeabe4
78 changed files with 98 additions and 91 deletions

View File

@ -3,7 +3,7 @@ SUBDIRS = listnames \
pingpong \ pingpong \
complexpingpong complexpingpong
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
SUBDIRS += chat \ SUBDIRS += chat \
remotecontrolledcar remotecontrolledcar
} }

View File

@ -8,7 +8,7 @@ SUBDIRS = \
xml \ xml \
qpa qpa
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
SUBDIRS += widgets \ SUBDIRS += widgets \
ipc \ ipc \
sql \ sql \
@ -17,12 +17,12 @@ SUBDIRS = \
gestures gestures
} }
wince*|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded wince*|embedded|x11:qtHaveModule(gui): SUBDIRS += embedded
contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):!contains(QT_CONFIG, no-widgets):SUBDIRS += qtestlib contains(QT_BUILD_PARTS, tools):qtHaveModule(gui):qtHaveModule(widgets): SUBDIRS += qtestlib
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, no-widgets):SUBDIRS += opengl qtHaveModule(opengl):qtHaveModule(widgets): SUBDIRS += opengl
contains(QT_CONFIG, dbus): SUBDIRS += dbus qtHaveModule(dbus): SUBDIRS += dbus
contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent qtHaveModule(concurrent): SUBDIRS += qtconcurrent
aggregate.files = aggregate/examples.pro aggregate.files = aggregate/examples.pro
aggregate.path = $$[QT_INSTALL_EXAMPLES] aggregate.path = $$[QT_INSTALL_EXAMPLES]

View File

@ -4,7 +4,7 @@ SUBDIRS = \
download \ download \
downloadmanager downloadmanager
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
SUBDIRS += \ SUBDIRS += \
blockingfortuneclient \ blockingfortuneclient \
broadcastreceiver \ broadcastreceiver \

View File

@ -5,7 +5,7 @@ TEMPLATE = app
SOURCES += main.cpp SOURCES += main.cpp
contains(QT_CONFIG, opengl) { qtHaveModule(opengl) {
QT += opengl QT += opengl
SOURCES += mainwidget.cpp \ SOURCES += mainwidget.cpp \

View File

@ -8,7 +8,7 @@ SUBDIRS = imagescaling \
SUBDIRS += progressdialog SUBDIRS += progressdialog
} }
contains(QT_CONFIG, no-widgets) { !qtHaveModule(widgets) {
SUBDIRS -= \ SUBDIRS -= \
imagescaling \ imagescaling \
progressdialog \ progressdialog \

View File

@ -4,4 +4,4 @@ CONFIG += no_docs_target
SUBDIRS = semaphores \ SUBDIRS = semaphores \
waitconditions waitconditions
!contains(QT_CONFIG, no-widgets):SUBDIRS += mandelbrot qtHaveModule(widgets): SUBDIRS += mandelbrot

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h \ HEADERS = mainwindow.h \
scribblearea.h scribblearea.h

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
HEADERS += boat.h \ HEADERS += boat.h \
bomb.h \ bomb.h \
mainwindow.h \ mainwindow.h \

View File

@ -5,8 +5,8 @@ SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp SOURCES += mainwindow.cpp view.cpp chip.cpp
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
build_all:!build_pass { build_all:!build_pass {
CONFIG -= build_all CONFIG -= build_all

View File

@ -15,6 +15,6 @@ SUBDIRS = \
contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{ qtHaveModule(opengl):!contains(QT_CONFIG, opengles.) {
SUBDIRS += boxes SUBDIRS += boxes
} }

View File

@ -17,7 +17,7 @@ FORMS += \
form.ui form.ui
QT += widgets QT += widgets
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
# install # install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/padnavigator target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/padnavigator

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = imagemodel.h \ HEADERS = imagemodel.h \
mainwindow.h \ mainwindow.h \

View File

@ -1,6 +1,6 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
#unix:contains(QT_CONFIG, dbus):QT += dbus widgets #unix:qtHaveModule(dbus): QT += dbus widgets
HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
SOURCES += main.cpp \ SOURCES += main.cpp \

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h HEADERS = mainwindow.h
SOURCES = main.cpp \ SOURCES = main.cpp \

View File

@ -1,7 +1,7 @@
SOURCES += main.cpp xform.cpp SOURCES += main.cpp xform.cpp
HEADERS += xform.h HEADERS += xform.h
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri) include($$SHARED_FOLDER/shared.pri)
RESOURCES += composition.qrc RESOURCES += composition.qrc
contains(QT_CONFIG, opengl) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += deform.qrc RESOURCES += deform.qrc
contains(QT_CONFIG, opengl) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
FORMS = mainwindowbase.ui FORMS = mainwindowbase.ui
HEADERS = mainwindow.h HEADERS = mainwindow.h

View File

@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri) include($$SHARED_FOLDER/shared.pri)
RESOURCES += gradients.qrc RESOURCES += gradients.qrc
contains(QT_CONFIG, opengl) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += pathstroke.qrc RESOURCES += pathstroke.qrc
contains(QT_CONFIG, opengl) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl widgets QT += opengl widgets
} }

View File

@ -1,7 +1,7 @@
TEMPLATE = lib TEMPLATE = lib
CONFIG += static CONFIG += static
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) { qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT DEFINES += QT_OPENGL_SUPPORT
QT += opengl QT += opengl
} }

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = detailsdialog.h \ HEADERS = detailsdialog.h \
mainwindow.h mainwindow.h

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
TEMPLATE = app TEMPLATE = app
TARGET = textedit TARGET = textedit

View File

@ -3,7 +3,7 @@ SUBDIRS = \
factorial \ factorial \
pingpong pingpong
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
SUBDIRS += \ SUBDIRS += \
eventtransitions \ eventtransitions \
rogue \ rogue \

View File

@ -5,4 +5,4 @@ SUBDIRS = hellothread \
clock \ clock \
movedobject movedobject
contains(QT_CONFIG, concurrent): SUBDIRS += helloconcurrent qtHaveModule(concurrent): SUBDIRS += helloconcurrent

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = imageviewer.h HEADERS = imageviewer.h
SOURCES = imageviewer.cpp \ SOURCES = imageviewer.cpp \

View File

@ -1,5 +1,5 @@
QT += widgets QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h \ HEADERS = mainwindow.h \
scribblearea.h scribblearea.h

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = htmlinfo \ SUBDIRS = htmlinfo \
xmlstreamlint xmlstreamlint
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
SUBDIRS += dombookmarks \ SUBDIRS += dombookmarks \
rsslisting \ rsslisting \
saxbookmarks \ saxbookmarks \

View File

@ -53,6 +53,6 @@ insignificant_test:!isEmpty(check.commands) {
check.commands = -$${check.commands} check.commands = -$${check.commands}
} }
isEmpty(QT.widgets.name):CONFIG += insignificant_test # QTBUG-28540 !qtHaveModule(widgets): CONFIG += insignificant_test # QTBUG-28540
QMAKE_EXTRA_TARGETS *= check QMAKE_EXTRA_TARGETS *= check

View File

@ -51,6 +51,13 @@ defineTest(qtProcessModuleFlags) {
export($$1) export($$1)
} }
# qt module
defineTest(qtHaveModule) {
!isEmpty(QT.$${1}.name): \
return(true)
return(false)
}
# qt module, UsePrivate flag, libs variable # qt module, UsePrivate flag, libs variable
defineTest(qtAddModule) { defineTest(qtAddModule) {
MODULE_NAME = $$eval(QT.$${1}.name) MODULE_NAME = $$eval(QT.$${1}.name)

View File

@ -1,4 +1,4 @@
contains(QT_CONFIG, dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) { qtHaveModule(dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
QT += dbus QT += dbus
include(../../3rdparty/atspi2/atspi2.pri) include(../../3rdparty/atspi2/atspi2.pri)

View File

@ -1,6 +1,6 @@
TEMPLATE = subdirs TEMPLATE = subdirs
linux*:contains(QT_CONFIG, dbus) { linux*:qtHaveModule(dbus) {
SUBDIRS += generic SUBDIRS += generic
SUBDIRS += connman networkmanager SUBDIRS += connman networkmanager
} }

View File

@ -1,4 +1,4 @@
TEMPLATE = subdirs TEMPLATE = subdirs
contains(QT_CONFIG, dbus) { qtHaveModule(dbus) {
!macx:!win32:SUBDIRS += ibus maliit !macx:!win32:SUBDIRS += ibus maliit
} }

View File

@ -82,7 +82,7 @@ LIBS += -framework Cocoa -framework IOKit
QT += core-private gui-private platformsupport-private QT += core-private gui-private platformsupport-private
!contains(QT_CONFIG, no-widgets) { qtHaveModule(widgets) {
OBJECTIVE_SOURCES += \ OBJECTIVE_SOURCES += \
qpaintengine_mac.mm \ qpaintengine_mac.mm \
qprintengine_mac.mm \ qprintengine_mac.mm \

View File

@ -1,7 +1,7 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS *= sqldrivers bearer SUBDIRS *= sqldrivers bearer
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats platforms platforminputcontexts generic qtHaveModule(gui): SUBDIRS *= imageformats platforms platforminputcontexts generic
!contains(QT_CONFIG, no-widgets): SUBDIRS += accessible qtHaveModule(widgets): SUBDIRS += accessible
!wince*:!contains(QT_CONFIG, no-widgets):SUBDIRS += printsupport !wince*:qtHaveModule(widgets): SUBDIRS += printsupport

View File

@ -18,7 +18,7 @@ SUBDIRS += \
wince*: SUBDIRS -= printsupport wince*: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools cross_compile: SUBDIRS -= tools
isEmpty(QT.opengl.name): SUBDIRS -= opengl !qtHaveModule(opengl): SUBDIRS -= opengl
!unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus !unix|embedded|!qtHaveModule(dbus): SUBDIRS -= dbus
contains(QT_CONFIG, no-widgets): SUBDIRS -= widgets printsupport !qtHaveModule(widgets): SUBDIRS -= widgets printsupport
!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent !qtHaveModule(concurrent): SUBDIRS -= concurrent

View File

@ -8,5 +8,5 @@ SUBDIRS=\
qsequentialanimationgroup \ qsequentialanimationgroup \
qvariantanimation qvariantanimation
contains(QT_CONFIG, no-widgets): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qpropertyanimation qpropertyanimation

View File

@ -17,5 +17,5 @@ SUBPROGRAMS = \
!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding !contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
contains(QT_CONFIG, no-widgets): SUBPROGRAMS -= \ !qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess testGuiProcess

View File

@ -3,7 +3,7 @@ TEMPLATE=subdirs
SUBDIRS = qabstractitemmodel \ SUBDIRS = qabstractitemmodel \
qstringlistmodel qstringlistmodel
!contains(QT_CONFIG, no-widgets): SUBDIRS += \ qtHaveModule(widgets): SUBDIRS += \
qabstractproxymodel \ qabstractproxymodel \
qidentityproxymodel \ qidentityproxymodel \
qitemmodel \ qitemmodel \

View File

@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qpointer TARGET = tst_qpointer
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES = tst_qpointer.cpp SOURCES = tst_qpointer.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qstatemachine TARGET = tst_qstatemachine
QT = core-private testlib gui QT = core-private testlib gui
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES = tst_qstatemachine.cpp SOURCES = tst_qstatemachine.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qicon TARGET = tst_qicon
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qicon.cpp SOURCES += tst_qicon.cpp
RESOURCES = tst_qicon.qrc RESOURCES = tst_qicon.qrc

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qmovie TARGET = tst_qmovie
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp SOURCES += tst_qmovie.cpp
MOC_DIR=tmp MOC_DIR=tmp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qpicture TARGET = tst_qpicture
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qpicture.cpp SOURCES += tst_qpicture.cpp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qpixmap TARGET = tst_qpixmap
QT += core-private gui-private testlib 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 SOURCES += tst_qpixmap.cpp
!wince* { !wince* {

View File

@ -3,5 +3,5 @@ SUBDIRS= \
qstandarditem \ qstandarditem \
qstandarditemmodel qstandarditemmodel
isEmpty(QT.widgets.name):SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qstandarditemmodel qstandarditemmodel

View File

@ -19,6 +19,6 @@ SUBDIRS=\
qwindow \ qwindow \
qguiapplication \ qguiapplication \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \ qmouseevent_modal \
qtouchevent qtouchevent

View File

@ -3,8 +3,8 @@ CONFIG += parallel_test
TARGET = tst_qpainter TARGET = tst_qpainter
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private qtHaveModule(widgets): QT += widgets widgets-private
!contains(QT_CONFIG, no-widgets):!wince*: QT += printsupport qtHaveModule(widgets):!wince*: QT += printsupport
SOURCES += tst_qpainter.cpp SOURCES += tst_qpainter.cpp

View File

@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qfont TARGET = tst_qfont
QT += testlib QT += testlib
QT += core-private gui-private QT += core-private gui-private
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp SOURCES += tst_qfont.cpp

View File

@ -3,5 +3,5 @@ CONFIG += parallel_test
TARGET = tst_qsyntaxhighlighter TARGET = tst_qsyntaxhighlighter
SOURCES += tst_qsyntaxhighlighter.cpp SOURCES += tst_qsyntaxhighlighter.cpp
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets) QT += widgets qtHaveModule(widgets) QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qtextdocumentlayout TARGET = tst_qtextdocumentlayout
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets) QT += widgets qtHaveModule(widgets) QT += widgets
SOURCES += tst_qtextdocumentlayout.cpp SOURCES += tst_qtextdocumentlayout.cpp

View File

@ -6,7 +6,7 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qtextobject TARGET = tst_qtextobject
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtextobject.cpp SOURCES += tst_qtextobject.cpp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qtexttable TARGET = tst_qtexttable
QT += testlib QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtexttable.cpp SOURCES += tst_qtexttable.cpp

View File

@ -4,7 +4,7 @@
CONFIG += testcase CONFIG += testcase
TARGET = tst_qgl TARGET = tst_qgl
requires(contains(QT_CONFIG,opengl)) requires(qtHaveModule(opengl))
QT += widgets widgets-private opengl-private gui-private core-private testlib QT += widgets widgets-private opengl-private gui-private core-private testlib
SOURCES += tst_qgl.cpp SOURCES += tst_qgl.cpp

View File

@ -5,7 +5,7 @@
CONFIG += testcase CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qglbuffer TARGET = tst_qglbuffer
requires(contains(QT_CONFIG,opengl)) requires(qtHaveModule(opengl))
QT += opengl widgets testlib QT += opengl widgets testlib
SOURCES += tst_qglbuffer.cpp SOURCES += tst_qglbuffer.cpp

View File

@ -1,7 +1,7 @@
CONFIG += testcase CONFIG += testcase
CONFIG += parallel_test CONFIG += parallel_test
TARGET = tst_qglfunctions TARGET = tst_qglfunctions
requires(contains(QT_CONFIG,opengl)) requires(qtHaveModule(opengl))
QT += opengl widgets testlib QT += opengl widgets testlib
SOURCES += tst_qglfunctions.cpp SOURCES += tst_qglfunctions.cpp

View File

@ -1,6 +1,6 @@
CONFIG += testcase CONFIG += testcase
TARGET = tst_qglthreads TARGET = tst_qglthreads
requires(contains(QT_CONFIG,opengl)) requires(qtHaveModule(opengl))
QT += opengl widgets testlib gui-private core-private QT += opengl widgets testlib gui-private core-private
HEADERS += tst_qglthreads.h HEADERS += tst_qglthreads.h

View File

@ -6,7 +6,7 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += xml svg network testlib QT += xml svg network testlib
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
include($$ARTHUR/datagenerator/datagenerator.pri) include($$ARTHUR/datagenerator/datagenerator.pri)

View File

@ -26,7 +26,7 @@ SUBDIRS=\
qtokenautomaton \ qtokenautomaton \
windowsmobile \ windowsmobile \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
baselineexample \ baselineexample \
gestures \ gestures \
headersclean \ headersclean \

View File

@ -4,5 +4,5 @@ SUBDIRS=\
qsqlrelationaltablemodel \ qsqlrelationaltablemodel \
qsqltablemodel \ qsqltablemodel \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qsqlquerymodel qsqlquerymodel

View File

@ -31,7 +31,7 @@ SOURCES += tst_moc.cpp
QT -= gui QT -= gui
QT += sql network testlib QT += sql network testlib
contains(QT_CONFIG, dbus){ qtHaveModule(dbus) {
DEFINES += WITH_DBUS DEFINES += WITH_DBUS
QT += dbus QT += dbus
} }

View File

@ -5,4 +5,4 @@ SUBDIRS=\
moc \ moc \
rcc \ rcc \
contains(QT_CONFIG, dbus):SUBDIRS += qdbuscpp2xml qdbusxml2cpp qtHaveModule(dbus): SUBDIRS += qdbuscpp2xml qdbusxml2cpp

View File

@ -6,7 +6,7 @@ QT += gui-private widgets testlib
INCLUDEPATH += . INCLUDEPATH += .
SOURCES += tst_qmdiarea.cpp SOURCES += tst_qmdiarea.cpp
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
mac { mac {
LIBS += -framework Security LIBS += -framework Security

View File

@ -5,8 +5,8 @@ SUBDIRS = \
network \ network \
sql \ sql \
# removed-by-refactor contains(QT_CONFIG, opengl): SUBDIRS += opengl # removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl
contains(QT_CONFIG, dbus): SUBDIRS += dbus qtHaveModule(dbus): SUBDIRS += dbus
check-trusted.CONFIG += recursive check-trusted.CONFIG += recursive
QMAKE_EXTRA_TARGETS += check-trusted QMAKE_EXTRA_TARGETS += check-trusted

View File

@ -7,6 +7,6 @@ SUBDIRS = \
qvariant \ qvariant \
qcoreapplication qcoreapplication
isEmpty(QT.widgets.name): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qmetaobject \ qmetaobject \
qobject qobject

View File

@ -6,7 +6,7 @@ CONFIG += release exceptions
SOURCES += main.cpp SOURCES += main.cpp
RESOURCES += qregexp.qrc RESOURCES += qregexp.qrc
!isEmpty(QT.script.name):!pcre { qtHaveModule(script):!pcre {
DEFINES += HAVE_JSC DEFINES += HAVE_JSC
QT += script QT += script
} }

View File

@ -1,2 +1,2 @@
TEMPLATE = subdirs TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = qanimation qtHaveModule(widgets): SUBDIRS = qanimation

View File

@ -1,7 +1,7 @@
TEMPLATE = app TEMPLATE = app
QT += svg testlib QT += svg testlib
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
HEADERS += widgets/gvbwidget.h \ HEADERS += widgets/gvbwidget.h \
widgets/abstractscrollarea.h \ widgets/abstractscrollarea.h \

View File

@ -8,7 +8,7 @@ SUBDIRS = \
qgraphicsview \ qgraphicsview \
qgraphicswidget qgraphicswidget
isEmpty(QT.widgets.name): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qgraphicsanchorlayout \ qgraphicsanchorlayout \
qgraphicsitem \ qgraphicsitem \
qgraphicsscene \ qgraphicsscene \

View File

@ -4,7 +4,7 @@ HEADERS += mainwindow.h view.h chip.h
SOURCES += main.cpp SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp SOURCES += mainwindow.cpp view.cpp chip.cpp
contains(QT_CONFIG, opengl):QT += opengl qtHaveModule(opengl): QT += opengl
build_all:!build_pass { build_all:!build_pass {
CONFIG -= build_all CONFIG -= build_all

View File

@ -10,4 +10,4 @@ RESOURCES += \
chiptester/images.qrc chiptester/images.qrc
QT += widgets QT += widgets
contains(QT_CONFIG, opengl) QT += opengl qtHaveModule(opengl): QT += opengl

View File

@ -17,5 +17,5 @@ TRUSTED_BENCHMARKS += \
include(../trusted-benchmarks.pri) include(../trusted-benchmarks.pri)
isEmpty(QT.widgets.name): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
itemviews itemviews

View File

@ -6,5 +6,5 @@ SUBDIRS = \
qpixmap \ qpixmap \
qpixmapcache qpixmapcache
isEmpty(QT.widgets.name): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qimagereader qimagereader

View File

@ -1,4 +1,4 @@
TEMPLATE = subdirs TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = \ qtHaveModule(widgets): SUBDIRS = \
qapplication \ qapplication \
qwidget qwidget

View File

@ -6,7 +6,7 @@ SUBDIRS = \
qtracebench \ qtracebench \
qtbench qtbench
isEmpty(QT.widgets.name): SUBDIRS -= \ !qtHaveModule(widgets): SUBDIRS -= \
qpainter \ qpainter \
qtracebench \ qtracebench \
qtbench qtbench

View File

@ -1,3 +1,3 @@
TEMPLATE = subdirs TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = \ qtHaveModule(widgets): SUBDIRS = \
qstylesheetstyle qstylesheetstyle

View File

@ -13,6 +13,6 @@ SOURCES += interactivewidget.cpp \
RESOURCES += icons.qrc \ RESOURCES += icons.qrc \
$$LANCELOT_DIR/images.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 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0