summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-24 12:48:39 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-24 12:48:42 +0200
commit840f6a40e6218992b5b9d451ee3c0886a4846c89 (patch)
tree2b808decc7adf5218b810d2de6b45c5a8b4cfc42 /examples
parent109bf980b37fed405c6c1eb14cb9c83ff897e389 (diff)
parent2e3870fe37d36ccf4bd84eb90e1d5e08ad00c1bc (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'examples')
-rw-r--r--examples/gui/gui.pro2
-rw-r--r--examples/qpa/qpa.pro2
-rw-r--r--examples/qtconcurrent/map/main.cpp22
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro5
-rw-r--r--examples/threads/semaphores/semaphores.cpp2
-rw-r--r--examples/threads/semaphores/semaphores.pro2
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp2
-rw-r--r--examples/threads/waitconditions/waitconditions.pro2
8 files changed, 13 insertions, 26 deletions
diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro
index 8758a1ba95..5fb4241e74 100644
--- a/examples/gui/gui.pro
+++ b/examples/gui/gui.pro
@@ -1,3 +1,5 @@
+requires(qtHaveModule(gui))
+
TEMPLATE = subdirs
CONFIG += no_docs_target
diff --git a/examples/qpa/qpa.pro b/examples/qpa/qpa.pro
index 6f07e50fd8..27293482ef 100644
--- a/examples/qpa/qpa.pro
+++ b/examples/qpa/qpa.pro
@@ -1,2 +1,4 @@
+requires(qtHaveModule(gui))
+
TEMPLATE = subdirs
SUBDIRS = windows
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp
index 199273b9a6..01595f0c2e 100644
--- a/examples/qtconcurrent/map/main.cpp
+++ b/examples/qtconcurrent/map/main.cpp
@@ -45,8 +45,6 @@
#include <QGuiApplication>
#include <qtconcurrentmap.h>
-#ifndef QT_NO_CONCURRENT
-
QImage scale(const QImage &image)
{
qDebug() << "Scaling image in thread" << QThread::currentThread();
@@ -70,23 +68,3 @@ int main(int argc, char *argv[])
return 0;
}
-
-#else
-
-#include <QLabel>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- QString text("Qt Concurrent is not yet supported on this platform");
-
- QLabel *label = new QLabel(text);
- label->setWordWrap(true);
-
- label->show();
- qDebug() << text;
-
- app.exec();
-}
-
-#endif
diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro
index 1df6f2d8cf..6e4e5f0f16 100644
--- a/examples/qtconcurrent/qtconcurrent.pro
+++ b/examples/qtconcurrent/qtconcurrent.pro
@@ -10,6 +10,11 @@ SUBDIRS = imagescaling \
SUBDIRS += progressdialog
}
+!qtHaveModule(gui) {
+ SUBDIRS -= \
+ map
+}
+
!qtHaveModule(widgets) {
SUBDIRS -= \
imagescaling \
diff --git a/examples/threads/semaphores/semaphores.cpp b/examples/threads/semaphores/semaphores.cpp
index f7b25238f6..fb7f1f2376 100644
--- a/examples/threads/semaphores/semaphores.cpp
+++ b/examples/threads/semaphores/semaphores.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtCore>
#include <stdio.h>
#include <stdlib.h>
diff --git a/examples/threads/semaphores/semaphores.pro b/examples/threads/semaphores/semaphores.pro
index 71bc5b3f35..7dfe7c3ba0 100644
--- a/examples/threads/semaphores/semaphores.pro
+++ b/examples/threads/semaphores/semaphores.pro
@@ -1,5 +1,5 @@
SOURCES += semaphores.cpp
-QT = core gui
+QT = core
CONFIG -= app_bundle
CONFIG += console
diff --git a/examples/threads/waitconditions/waitconditions.cpp b/examples/threads/waitconditions/waitconditions.cpp
index 3921334d42..6f5f56e737 100644
--- a/examples/threads/waitconditions/waitconditions.cpp
+++ b/examples/threads/waitconditions/waitconditions.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtCore>
#include <stdio.h>
#include <stdlib.h>
diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro
index c8de0b3774..7f9491a0b1 100644
--- a/examples/threads/waitconditions/waitconditions.pro
+++ b/examples/threads/waitconditions/waitconditions.pro
@@ -1,4 +1,4 @@
-QT = core gui
+QT = core
CONFIG -= moc app_bundle
CONFIG += console