diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
commit | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch) | |
tree | 58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/qtconcurrent | |
parent | ddb22795641253a026b72f752ebc769745dd41be (diff) | |
download | Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/qtconcurrent')
-rw-r--r-- | examples/qtconcurrent/imagescaling/imagescaling.desktop | 11 | ||||
-rw-r--r-- | examples/qtconcurrent/imagescaling/imagescaling.pro | 3 | ||||
-rw-r--r-- | examples/qtconcurrent/imagescaling/main.cpp | 21 | ||||
-rw-r--r-- | examples/qtconcurrent/map/main.cpp | 19 | ||||
-rw-r--r-- | examples/qtconcurrent/map/map.desktop | 11 | ||||
-rw-r--r-- | examples/qtconcurrent/map/map.pro | 3 | ||||
-rw-r--r-- | examples/qtconcurrent/progressdialog/main.cpp | 17 | ||||
-rw-r--r-- | examples/qtconcurrent/progressdialog/progressdialog.desktop | 11 | ||||
-rw-r--r-- | examples/qtconcurrent/progressdialog/progressdialog.pro | 4 | ||||
-rw-r--r-- | examples/qtconcurrent/qtconcurrent.pro | 1 | ||||
-rw-r--r-- | examples/qtconcurrent/runfunction/main.cpp | 19 | ||||
-rw-r--r-- | examples/qtconcurrent/runfunction/runfunction.desktop | 11 | ||||
-rw-r--r-- | examples/qtconcurrent/runfunction/runfunction.pro | 4 | ||||
-rw-r--r-- | examples/qtconcurrent/wordcount/main.cpp | 23 | ||||
-rw-r--r-- | examples/qtconcurrent/wordcount/wordcount.desktop | 11 | ||||
-rw-r--r-- | examples/qtconcurrent/wordcount/wordcount.pro | 4 |
16 files changed, 159 insertions, 14 deletions
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.desktop b/examples/qtconcurrent/imagescaling/imagescaling.desktop new file mode 100644 index 0000000..289f56c --- /dev/null +++ b/examples/qtconcurrent/imagescaling/imagescaling.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QtConcurrent Image Scaling +Exec=/opt/usr/bin/imagescaling +Icon=imagescaling +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro index c70013d..7840502 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.pro +++ b/examples/qtconcurrent/imagescaling/imagescaling.pro @@ -15,3 +15,6 @@ INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp index de64116..d6ca7e5 100644 --- a/examples/qtconcurrent/imagescaling/main.cpp +++ b/examples/qtconcurrent/imagescaling/main.cpp @@ -48,16 +48,33 @@ int main(int argc, char *argv[]) QApplication app(argc,argv); Images imageView; +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + imageView.showMaximized(); +#else imageView.show(); +#endif return app.exec(); } #else -int main() +int main(int argc, char *argv[]) { - qDebug() << "Qt Concurrent is not supported on this platform"; + QApplication app(argc, argv); + QString text("Qt Concurrent is not supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + label->showMaximized(); +#else + label->show(); +#endif + qDebug() << text; + + app.exec(); } #endif diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp index bb6c5c6..76b1447 100644 --- a/examples/qtconcurrent/map/main.cpp +++ b/examples/qtconcurrent/map/main.cpp @@ -73,9 +73,24 @@ int main(int argc, char *argv[]) #else -int main() +#include <QLabel> + +int main(int argc, char *argv[]) { - qDebug() << "Qt Concurrent is not yet supported on this platform"; + QApplication app(argc, argv); + QString text("Qt Concurrent is not yet supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + label->showMaximized(); +#else + label->show(); +#endif + qDebug() << text; + + app.exec(); } #endif diff --git a/examples/qtconcurrent/map/map.desktop b/examples/qtconcurrent/map/map.desktop new file mode 100644 index 0000000..7d8bba9 --- /dev/null +++ b/examples/qtconcurrent/map/map.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QtConcurrent Map +Exec=/opt/usr/bin/map +Icon=map +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro index e0b87f4..6a81fc7 100644 --- a/examples/qtconcurrent/map/map.pro +++ b/examples/qtconcurrent/map/map.pro @@ -14,3 +14,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/map INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp index 307baed..d302366 100644 --- a/examples/qtconcurrent/progressdialog/main.cpp +++ b/examples/qtconcurrent/progressdialog/main.cpp @@ -90,9 +90,22 @@ int main(int argc, char **argv) #else -int main() +int main(int argc, char *argv[]) { - qDebug() << "Qt Concurrent is not yet supported on this platform"; + QApplication app(argc, argv); + QString text("Qt Concurrent is not yet supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + label->showMaximized(); +#else + label->show(); +#endif + qDebug() << text; + + app.exec(); } #endif diff --git a/examples/qtconcurrent/progressdialog/progressdialog.desktop b/examples/qtconcurrent/progressdialog/progressdialog.desktop new file mode 100644 index 0000000..5179471 --- /dev/null +++ b/examples/qtconcurrent/progressdialog/progressdialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QtConcurrent Progress Dialog +Exec=/opt/usr/bin/progressdialog +Icon=progressdialog +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro index ffdb4c7..19fc18c 100644 --- a/examples/qtconcurrent/progressdialog/progressdialog.pro +++ b/examples/qtconcurrent/progressdialog/progressdialog.pro @@ -1,5 +1,4 @@ TEMPLATE = app -TARGET += DEPENDPATH += . INCLUDEPATH += . @@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/progressdialog INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro index 1157d25..ea458e7 100644 --- a/examples/qtconcurrent/qtconcurrent.pro +++ b/examples/qtconcurrent/qtconcurrent.pro @@ -14,4 +14,3 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtconcurrent.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent INSTALLS += target sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp index 1e448bb..86fdf80 100644 --- a/examples/qtconcurrent/runfunction/main.cpp +++ b/examples/qtconcurrent/runfunction/main.cpp @@ -64,9 +64,24 @@ int main(int argc, char **argv) #else -int main() +#include <QLabel> + +int main(int argc, char *argv[]) { - qDebug() << "Qt Concurrent is not yet supported on this platform"; + QApplication app(argc, argv); + QString text("Qt Concurrent is not yet supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + label->showMaximized(); +#else + label->show(); +#endif + qDebug() << text; + + app.exec(); } #endif diff --git a/examples/qtconcurrent/runfunction/runfunction.desktop b/examples/qtconcurrent/runfunction/runfunction.desktop new file mode 100644 index 0000000..0c36f89 --- /dev/null +++ b/examples/qtconcurrent/runfunction/runfunction.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QtConcurrent Run Function +Exec=/opt/usr/bin/runfunction +Icon=runfunction +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro index d312e2b..ddd60f8 100644 --- a/examples/qtconcurrent/runfunction/runfunction.pro +++ b/examples/qtconcurrent/runfunction/runfunction.pro @@ -1,5 +1,4 @@ TEMPLATE = app -TARGET += DEPENDPATH += . INCLUDEPATH += . @@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/runfunction INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp index 035207c..56be795 100644 --- a/examples/qtconcurrent/wordcount/main.cpp +++ b/examples/qtconcurrent/wordcount/main.cpp @@ -124,7 +124,11 @@ int main(int argc, char** argv) { QApplication app(argc, argv); qDebug() << "finding files..."; +#ifdef Q_WS_MAEMO_5 + QStringList files = findFiles("/usr/", QStringList() << "*.sh"); +#else QStringList files = findFiles("../../", QStringList() << "*.cpp" << "*.h"); +#endif qDebug() << files.count() << "files"; qDebug() << "warmup"; @@ -158,9 +162,24 @@ int main(int argc, char** argv) #else -int main() +#include <QLabel> + +int main(int argc, char *argv[]) { - qDebug() << "Qt Concurrent is not yet supported on this platform"; + QApplication app(argc, argv); + QString text("Qt Concurrent is not yet supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + label->showMaximized(); +#else + label->show(); +#endif + qDebug() << text; + + app.exec(); } #endif diff --git a/examples/qtconcurrent/wordcount/wordcount.desktop b/examples/qtconcurrent/wordcount/wordcount.desktop new file mode 100644 index 0000000..382d573 --- /dev/null +++ b/examples/qtconcurrent/wordcount/wordcount.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QtConcurrent Word Count +Exec=/opt/usr/bin/wordcount +Icon=wordcount +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro index 8cd0392..000c906 100644 --- a/examples/qtconcurrent/wordcount/wordcount.pro +++ b/examples/qtconcurrent/wordcount/wordcount.pro @@ -1,5 +1,4 @@ TEMPLATE = app -TARGET += DEPENDPATH += . INCLUDEPATH += . @@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/wordcount INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example does not work on Simulator platform) |