From f6a5e3d1e843a6417d03f8146269aeb97ae8f728 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Oct 2013 21:20:54 +0200 Subject: remove remaining non-concurrent branches from concurrent samples amends 677825f0bad9. Change-Id: I8bc3ade3a1602b9a2c0bdc837f4b19c67b2e0dba Reviewed-by: Joerg Bornemann --- .../qtconcurrent/imagescaling/imagescaling.cpp | 4 ---- examples/qtconcurrent/imagescaling/imagescaling.h | 16 ---------------- examples/qtconcurrent/imagescaling/main.cpp | 20 -------------------- examples/qtconcurrent/progressdialog/main.cpp | 21 --------------------- examples/qtconcurrent/runfunction/main.cpp | 22 ---------------------- examples/qtconcurrent/wordcount/main.cpp | 22 ---------------------- 6 files changed, 105 deletions(-) (limited to 'examples') 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 #include -#ifndef QT_NO_CONCURRENT - class Images : public QWidget { Q_OBJECT @@ -65,18 +63,4 @@ private: QFutureWatcher *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 #include -#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 #include -#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 #include -#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 - -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 -#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 - -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 -- cgit v1.2.3