From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- examples/qtconcurrent/wordcount/main.cpp | 23 +++++++++++++++++++++-- examples/qtconcurrent/wordcount/wordcount.pro | 4 +++- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'examples/qtconcurrent/wordcount') diff --git a/examples/qtconcurrent/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp index 035207c410..56be795c60 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 + +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.pro b/examples/qtconcurrent/wordcount/wordcount.pro index c6e4d852f5..1596e9c1eb 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]/qtbase/qtconcurrent/wordcount INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +simulator: warning(This example does not work on Simulator platform) -- cgit v1.2.3 From 0cbcc61ef35b9bce1d65d048853c79004b755b87 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 11 May 2011 17:35:46 +0200 Subject: Squashed commit of changes from the 4.8-temp branch. --- examples/qtconcurrent/wordcount/wordcount.desktop | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/qtconcurrent/wordcount/wordcount.desktop (limited to 'examples/qtconcurrent/wordcount') diff --git a/examples/qtconcurrent/wordcount/wordcount.desktop b/examples/qtconcurrent/wordcount/wordcount.desktop new file mode 100644 index 0000000000..382d573583 --- /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 -- cgit v1.2.3