summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-12-21 12:09:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-21 19:05:02 +0100
commit586adeabe4d58a7c8a71bbb1be79c3533ab858ff (patch)
tree62a13574bca965442bc1c66bd63d54550e3db7a0 /examples/widgets/painting
parent7706c31eaa686299d7e22da809fec00c0db47c86 (diff)
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>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r--examples/widgets/painting/affine/affine.pro2
-rw-r--r--examples/widgets/painting/composition/composition.pro2
-rw-r--r--examples/widgets/painting/deform/deform.pro2
-rw-r--r--examples/widgets/painting/fontsampler/fontsampler.pro2
-rw-r--r--examples/widgets/painting/gradients/gradients.pro2
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.pro2
-rw-r--r--examples/widgets/painting/shared/shared.pri2
-rw-r--r--examples/widgets/painting/shared/shared.pro2
8 files changed, 8 insertions, 8 deletions
diff --git a/examples/widgets/painting/affine/affine.pro b/examples/widgets/painting/affine/affine.pro
index e94f4d12fb..1f2f8df87f 100644
--- a/examples/widgets/painting/affine/affine.pro
+++ b/examples/widgets/painting/affine/affine.pro
@@ -1,7 +1,7 @@
SOURCES += main.cpp xform.cpp
HEADERS += xform.h
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/composition/composition.pro b/examples/widgets/painting/composition/composition.pro
index 7ff82d789a..0269945ac8 100644
--- a/examples/widgets/painting/composition/composition.pro
+++ b/examples/widgets/painting/composition/composition.pro
@@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += composition.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/deform/deform.pro b/examples/widgets/painting/deform/deform.pro
index 01dc0a869c..6409aaed96 100644
--- a/examples/widgets/painting/deform/deform.pro
+++ b/examples/widgets/painting/deform/deform.pro
@@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += deform.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/fontsampler/fontsampler.pro b/examples/widgets/painting/fontsampler/fontsampler.pro
index 8325da0175..08dd07bc08 100644
--- a/examples/widgets/painting/fontsampler/fontsampler.pro
+++ b/examples/widgets/painting/fontsampler/fontsampler.pro
@@ -1,5 +1,5 @@
QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
+qtHaveModule(printsupport): QT += printsupport
FORMS = mainwindowbase.ui
HEADERS = mainwindow.h
diff --git a/examples/widgets/painting/gradients/gradients.pro b/examples/widgets/painting/gradients/gradients.pro
index a7d6ae68d1..73f3974c62 100644
--- a/examples/widgets/painting/gradients/gradients.pro
+++ b/examples/widgets/painting/gradients/gradients.pro
@@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += gradients.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/pathstroke/pathstroke.pro b/examples/widgets/painting/pathstroke/pathstroke.pro
index 197fe22024..8ab3cb9244 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.pro
+++ b/examples/widgets/painting/pathstroke/pathstroke.pro
@@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += pathstroke.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/shared/shared.pri b/examples/widgets/painting/shared/shared.pri
index 6aef1bdd5b..1b8be82d03 100644
--- a/examples/widgets/painting/shared/shared.pri
+++ b/examples/widgets/painting/shared/shared.pri
@@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl widgets
}
diff --git a/examples/widgets/painting/shared/shared.pro b/examples/widgets/painting/shared/shared.pro
index 42b474a946..2756bf75ca 100644
--- a/examples/widgets/painting/shared/shared.pro
+++ b/examples/widgets/painting/shared/shared.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
CONFIG += static
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}