summaryrefslogtreecommitdiffstats
path: root/examples/qtconcurrent
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-25 21:20:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-29 15:37:30 +0100
commitf6a5e3d1e843a6417d03f8146269aeb97ae8f728 (patch)
treeb1d665b4e92e94e93ccdb367489c6789601409f3 /examples/qtconcurrent
parent8b61ec579693b4420f62e9563c61035659de7ffe (diff)
remove remaining non-concurrent branches from concurrent samples
amends 677825f0bad9. Change-Id: I8bc3ade3a1602b9a2c0bdc837f4b19c67b2e0dba Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'examples/qtconcurrent')
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.cpp4
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.h16
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp20
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp21
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp22
-rw-r--r--examples/qtconcurrent/wordcount/main.cpp22
6 files changed, 0 insertions, 105 deletions
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.cpp b/examples/qtconcurrent/imagescaling/imagescaling.cpp
index 01083edb4e..9cc8ef655d 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.cpp
+++ b/examples/qtconcurrent/imagescaling/imagescaling.cpp
@@ -40,8 +40,6 @@
#include "imagescaling.h"
#include "math.h"
-#ifndef QT_NO_CONCURRENT
-
const int imageSize = 100;
QImage scale(const QString &imageFileName)
@@ -141,5 +139,3 @@ void Images::finished()
cancelButton->setEnabled(false);
pauseButton->setEnabled(false);
}
-
-#endif // QT_NO_CONCURRENT
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.h b/examples/qtconcurrent/imagescaling/imagescaling.h
index 3c02db05b9..a84e2bdb6d 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.h
+++ b/examples/qtconcurrent/imagescaling/imagescaling.h
@@ -43,8 +43,6 @@
#include <QtWidgets>
#include <QtConcurrent>
-#ifndef QT_NO_CONCURRENT
-
class Images : public QWidget
{
Q_OBJECT
@@ -65,18 +63,4 @@ private:
QFutureWatcher<QImage> *imageScaling;
};
-#else
-
-// Dummy class required because QT_NO_CONCURRENT is not set when moc is run.
-class Images : public QWidget
-{
-Q_OBJECT
-public Q_SLOTS:
- void open() {}
- void showImage(int) {}
- void finished() {}
-};
-
-#endif // QT_NO_CONCURRENT
-
#endif // IMAGESCALING_H
diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp
index ccdea2e771..442c8a4771 100644
--- a/examples/qtconcurrent/imagescaling/main.cpp
+++ b/examples/qtconcurrent/imagescaling/main.cpp
@@ -40,8 +40,6 @@
#include <QtWidgets>
#include <QtConcurrent>
-#ifndef QT_NO_CONCURRENT
-
#include "imagescaling.h"
int main(int argc, char *argv[])
@@ -53,21 +51,3 @@ int main(int argc, char *argv[])
return app.exec();
}
-
-#else
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- QString text("Qt Concurrent is not supported on this platform");
-
- QLabel *label = new QLabel(text);
- label->setWordWrap(true);
-
- label->show();
- qDebug() << text;
-
- app.exec();
-}
-
-#endif
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
index c646105db6..01d4aef256 100644
--- a/examples/qtconcurrent/progressdialog/main.cpp
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -41,8 +41,6 @@
#include <QtWidgets>
#include <QtConcurrent>
-#ifndef QT_NO_CONCURRENT
-
using namespace QtConcurrent;
const int iterations = 20;
@@ -88,22 +86,3 @@ int main(int argc, char **argv)
// Query the future to check if was canceled.
qDebug() << "Canceled?" << futureWatcher.future().isCanceled();
}
-
-#else
-
-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/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp
index 0e62bd0a75..85c5e1267a 100644
--- a/examples/qtconcurrent/runfunction/main.cpp
+++ b/examples/qtconcurrent/runfunction/main.cpp
@@ -44,8 +44,6 @@
#include <qtconcurrentrun.h>
#include <QApplication>
-#ifndef QT_NO_CONCURRENT
-
using namespace QtConcurrent;
void hello(QString name)
@@ -61,23 +59,3 @@ int main(int argc, char **argv)
f1.waitForFinished();
f2.waitForFinished();
}
-
-#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/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp
index 635951fd4a..408e92dbb3 100644
--- a/examples/qtconcurrent/wordcount/main.cpp
+++ b/examples/qtconcurrent/wordcount/main.cpp
@@ -50,8 +50,6 @@
#include <qtconcurrentmap.h>
-#ifndef QT_NO_CONCURRENT
-
using namespace QtConcurrent;
/*
@@ -155,23 +153,3 @@ int main(int argc, char** argv)
}
qDebug() << "MapReduce speedup x" << ((double)singleThreadTime - (double)mapReduceTime) / (double)mapReduceTime + 1;
}
-
-#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