make use of qtHaveModule()
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Fri, 21 Dec 2012 10:02:52 +0000 (11:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 8 Jan 2013 10:09:04 +0000 (11:09 +0100)
Change-Id: I494ad22447fe54be405698f2dfd79e4941019bdc
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
examples/designer/arthurplugin/arthurplugin.pro
examples/examples.pro
src/assistant/assistant/assistant.pro
src/designer/src/designer/designer.pro
src/designer/src/plugins/plugins.pro
src/linguist/linguist.pro
src/linguist/linguist/linguist.pro
src/linguist/lupdate/lupdate.pro
src/qdbus/qdbus.pro
src/src.pro
tests/auto/auto.pro

index ea09398..9d62718 100644 (file)
@@ -18,7 +18,7 @@ INSTALLS += target
 
 }
 
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
     DEFINES += QT_OPENGL_SUPPORT
     QT += opengl
 }
index cacdec5..4955969 100644 (file)
@@ -1,3 +1,3 @@
 TEMPLATE = subdirs
-!isEmpty(QT.widgets.name): SUBDIRS += help designer linguist uitools assistant
+qtHaveModule(widgets): SUBDIRS += help designer linguist uitools assistant
 
index 6ebd9ee..168725c 100644 (file)
@@ -2,14 +2,14 @@ TEMPLATE = app
 LANGUAGE = C++
 TARGET = assistant
 DESTDIR = $$QT.help.bins
-!isEmpty(QT.webkitwidgets.name) {
+qtHaveModule(webkitwidgets) {
     QT += webkitwidgets
 } else {
     DEFINES += QT_NO_WEBKIT
 }
 !build_pass:contains(QT_CONFIG, build_all): CONFIG += release
 QT += widgets network help sql help
-!isEmpty(QT.printsupport.name): QT += printsupport
+qtHaveModule(printsupport): QT += printsupport
 PROJECTNAME = Assistant
 
 include(../../shared/fontpanel/fontpanel.pri)
@@ -79,7 +79,7 @@ SOURCES += aboutdialog.cpp \
     openpageswidget.cpp \
     openpagesmanager.cpp \
     openpagesswitcher.cpp
-contains(QT_CONFIG, webkitwidgets) {
+qtHaveModule(webkitwidgets) {
     SOURCES += helpviewer_qwv.cpp
 } else {
     SOURCES += helpviewer_qtb.cpp
index 0a3af78..6eb07fd 100644 (file)
@@ -1,6 +1,6 @@
 DESTDIR = $$QT.designer.bins
 QT += core-private widgets xml network designer-private designercomponents
-!isEmpty(QT.printsupport.name): QT += printsupport
+qtHaveModule(printsupport): QT += printsupport
 !build_pass:contains(QT_CONFIG, build_all): CONFIG += release
 
 INCLUDEPATH += \
index 5f04597..44f5e34 100644 (file)
@@ -2,6 +2,6 @@ TEMPLATE = subdirs
 CONFIG += ordered
 
 REQUIRES = !CONFIG(static,shared|static)
-# contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d
-contains(QT_CONFIG, webkitwidgets): SUBDIRS += qwebview
+# qtHaveModule(opengl): SUBDIRS += tools/view3d
+qtHaveModule(webkitwidgets): SUBDIRS += qwebview
 # win32: contains(QT_CONFIG, activeqt): SUBDIRS += activeqt
index 7123998..04b0ab6 100644 (file)
@@ -3,7 +3,7 @@ SUBDIRS  = \
     lrelease \
     lupdate \
     lconvert
-!no-png:!isEmpty(QT.widgets.name): SUBDIRS += linguist
+!no-png:qtHaveModule(widgets): SUBDIRS += linguist
 
 win32:CMAKE_BIN_SUFFIX = ".exe"
 
index 795bd10..a19fec0 100644 (file)
@@ -3,7 +3,7 @@ LANGUAGE = C++
 DESTDIR = $$QT.designer.bins
 
 QT += core-private widgets xml uitools-private
-!isEmpty(QT.printsupport.name): QT += printsupport
+qtHaveModule(printsupport): QT += printsupport
 
 DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
 !build_pass:contains(QT_CONFIG, build_all): CONFIG += release
index b9782e9..ee42568 100644 (file)
@@ -1,6 +1,6 @@
 QT = core-private
 
-!isEmpty(QT.qmldevtools.name) {
+qtHaveModule(qmldevtools) {
     QT += qmldevtools-private
 } else {
     DEFINES += QT_NO_QML
@@ -20,7 +20,7 @@ SOURCES += \
     java.cpp \
     ui.cpp
 
-!isEmpty(QT.qmldevtools.name): SOURCES += qdeclarative.cpp
+qtHaveModule(qmldevtools): SOURCES += qdeclarative.cpp
 
 HEADERS += \
     lupdate.h \
index aeb1c96..df1f34f 100644 (file)
@@ -1,3 +1,3 @@
 TEMPLATE = subdirs
 SUBDIRS = qdbus
-!isEmpty(QT.widgets.name): SUBDIRS += qdbusviewer
+qtHaveModule(widgets): SUBDIRS += qdbusviewer
index c21cf2e..3799567 100644 (file)
@@ -1,7 +1,7 @@
 TEMPLATE = subdirs
 CONFIG += ordered
 
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
     no-png {
         message("Some graphics-related tools are unavailable without PNG support")
     } else {
@@ -21,7 +21,7 @@ mac {
 
 embedded:SUBDIRS += kmap2qmap
 
-contains(QT_CONFIG, dbus):SUBDIRS += qdbus
+qtHaveModule(dbus): SUBDIRS += qdbus
 # We don't need these command line utilities on embedded platforms.
 embedded: SUBDIRS += makeqpf
 
index 88b2cd1..074aa34 100644 (file)
@@ -13,7 +13,7 @@ SUBDIRS=\
 cross_compile:SUBDIRS -= host.pro
 
 # These tests need the QtHelp module
-isEmpty(QT.help.name): SUBDIRS -= \
+!qtHaveModule(help): SUBDIRS -= \
     qhelpcontentmodel \
     qhelpenginecore \
     qhelpgenerator \