[Qt] Use haveQtModule() in project files instead of manual checks
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 13:48:44 +0000 (13:48 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 13:48:44 +0000 (13:48 +0000)
Reviewed by Jocelyn Turcotte.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/qmake/mkspecs/features/default_pre.prf
Tools/qmake/mkspecs/features/features.prf

index 5c4aa5e..74a035b 100644 (file)
@@ -1,5 +1,14 @@
 2012-07-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
+        [Qt] Use haveQtModule() in project files instead of manual checks
+
+        Reviewed by Jocelyn Turcotte.
+
+        * qmake/mkspecs/features/default_pre.prf:
+        * qmake/mkspecs/features/features.prf:
+
+2012-07-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
+
         [Qt] Fix haveQtModule() check
 
         Without {} brackets we were pulling out the value of the module.name variable.
index 25593e7..a53276a 100644 (file)
@@ -107,7 +107,7 @@ else: PYTHON = python
 }
 
 haveQt(5): {
-    isEmpty(QT.widgets.name)|isEmpty(QT.printsupport.name) {
+    !haveQtModule(widgets)|!haveQtModule(printsupport) {
         root_project_file: message("WebKit1 requires the QtWidgets and QtPrintSupport modules. Disabling WebKit1.")
         CONFIG += no_webkit1
     }
index 6d99d11..95ac63e 100644 (file)
@@ -105,7 +105,7 @@ haveQt(5) {
 }
 
 # QStyle detection
-haveQt(4)|!isEmpty(QT.widgets.name): DEFINES += HAVE_QSTYLE=1
+haveQt(4)|haveQtModule(widgets): DEFINES += HAVE_QSTYLE=1
 
 # WebGL support
 !contains(DEFINES, ENABLE_WEBGL=.) {
@@ -129,7 +129,7 @@ haveQt(4)|!isEmpty(QT.widgets.name): DEFINES += HAVE_QSTYLE=1
 
 # orientation support
 haveQt(5) {
-    !isEmpty(QT.sensors.name) {
+    haveQtModule(sensors) {
         !contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=1
         !contains(DEFINES, ENABLE_DEVICE_ORIENTATION=.): DEFINES += ENABLE_DEVICE_ORIENTATION=1
     }