Make benchmarks compile without QtWidgets
authorRohan McGovern <rohan.mcgovern@nokia.com>
Mon, 30 Jul 2012 03:58:52 +0000 (13:58 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 30 Jul 2012 08:43:50 +0000 (10:43 +0200)
Ensure benchmarks which need QtWidgets are gracefully disabled when
that module is unavailable.

Fixed one unnecessary usage of "QT+=widgets".

Change-Id: I8031b5dca585749f0f4d22e0637adc3f57f4e418
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
tests/benchmarks/corelib/kernel/kernel.pro
tests/benchmarks/gui/animation/animation.pro
tests/benchmarks/gui/graphicsview/graphicsview.pro
tests/benchmarks/gui/gui.pro
tests/benchmarks/gui/image/image.pro
tests/benchmarks/gui/kernel/kernel.pro
tests/benchmarks/gui/painting/painting.pro
tests/benchmarks/gui/styles/styles.pro
tests/benchmarks/gui/text/qtext/qtext.pro

index 8b7d8c8..a55135b 100644 (file)
@@ -6,3 +6,7 @@ SUBDIRS = \
         qobject \
         qvariant \
         qcoreapplication
+
+isEmpty(QT.widgets.name): SUBDIRS -= \
+    qmetaobject \
+    qobject
index a4ba273..1c9a7c3 100644 (file)
@@ -1,2 +1,2 @@
 TEMPLATE = subdirs
-SUBDIRS = qanimation
+!isEmpty(QT.widgets.name):SUBDIRS = qanimation
index 4a85df8..f8ba062 100644 (file)
@@ -7,3 +7,10 @@ SUBDIRS = \
         qgraphicsscene \
         qgraphicsview \
         qgraphicswidget
+
+isEmpty(QT.widgets.name): SUBDIRS -= \
+    qgraphicsanchorlayout \
+    qgraphicsitem \
+    qgraphicsscene \
+    qgraphicsview \
+    qgraphicswidget
index 9cf701f..f4b84f0 100644 (file)
@@ -16,3 +16,6 @@ TRUSTED_BENCHMARKS += \
     painting/qtracebench
 
 include(../trusted-benchmarks.pri)
+
+isEmpty(QT.widgets.name): SUBDIRS -= \
+    itemviews
index a8c6732..fa26f3e 100644 (file)
@@ -5,3 +5,6 @@ SUBDIRS = \
         qimagereader \
         qpixmap \
         qpixmapcache
+
+isEmpty(QT.widgets.name): SUBDIRS -= \
+        qimagereader
index a50aad2..303eff9 100644 (file)
@@ -1,4 +1,4 @@
 TEMPLATE = subdirs
-SUBDIRS = \
+!isEmpty(QT.widgets.name):SUBDIRS = \
         qapplication \
         qwidget
index 76c26c1..e55222a 100644 (file)
@@ -5,3 +5,8 @@ SUBDIRS = \
         qtransform \
         qtracebench \
         qtbench
+
+isEmpty(QT.widgets.name): SUBDIRS -= \
+    qpainter \
+    qtracebench \
+    qtbench
index 7c1d069..8930de1 100644 (file)
@@ -1,3 +1,3 @@
 TEMPLATE = subdirs
-SUBDIRS = \
+!isEmpty(QT.widgets.name):SUBDIRS = \
         qstylesheetstyle
index 084cf85..d5597fb 100644 (file)
@@ -1,5 +1,5 @@
-QT += widgets testlib
-QT += gui-private widgets-private
+QT += testlib
+QT += gui-private
 
 TEMPLATE = app
 TARGET = tst_bench_QText