remove remaining non-concurrent branches from concurrent samples

amends 677825f0bad9.

Change-Id: I8bc3ade3a1602b9a2c0bdc837f4b19c67b2e0dba
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-10-25 21:20:54 +02:00 committed by The Qt Project
parent 8b61ec5796
commit f6a5e3d1e8
6 changed files with 0 additions and 105 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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