summaryrefslogtreecommitdiffstats
path: root/examples/ipc/localfortuneclient
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-27 19:16:41 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-05-23 14:24:07 +0200
commit0748751c9f097d9d866605306bbdd4b96e2a5c4e (patch)
tree1838365e6ad6592a26e193289d2136cb89319972 /examples/ipc/localfortuneclient
parent5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/ipc/localfortuneclient')
-rw-r--r--examples/ipc/localfortuneclient/client.cpp5
-rw-r--r--examples/ipc/localfortuneclient/client.h9
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro5
-rw-r--r--examples/ipc/localfortuneclient/main.cpp6
4 files changed, 23 insertions, 2 deletions
diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp
index c8c3fe4f35..86cc0cc005 100644
--- a/examples/ipc/localfortuneclient/client.cpp
+++ b/examples/ipc/localfortuneclient/client.cpp
@@ -44,7 +44,11 @@
#include "client.h"
Client::Client(QWidget *parent)
+#ifdef Q_WS_MAEMO_5
+ : QWidget(parent)
+#else
: QDialog(parent)
+#endif
{
hostLabel = new QLabel(tr("&Server name:"));
hostLineEdit = new QLineEdit("fortune");
@@ -53,6 +57,7 @@ Client::Client(QWidget *parent)
statusLabel = new QLabel(tr("This examples requires that you run the "
"Fortune Server example as well."));
+ statusLabel->setWordWrap(true);
getFortuneButton = new QPushButton(tr("Get Fortune"));
getFortuneButton->setDefault(true);
diff --git a/examples/ipc/localfortuneclient/client.h b/examples/ipc/localfortuneclient/client.h
index d23db9e6e2..b0f0e36189 100644
--- a/examples/ipc/localfortuneclient/client.h
+++ b/examples/ipc/localfortuneclient/client.h
@@ -41,7 +41,12 @@
#ifndef CLIENT_H
#define CLIENT_H
+#ifdef Q_WS_MAEMO_5
+#include <QWidget>
+#else
#include <QDialog>
+#endif
+
#include <qlocalsocket.h>
QT_BEGIN_NAMESPACE
@@ -52,7 +57,11 @@ class QPushButton;
class QLocalSocket;
QT_END_NAMESPACE
+#ifdef Q_WS_MAEMO_5
+class Client : public QWidget
+#else
class Client : public QDialog
+#endif
{
Q_OBJECT
diff --git a/examples/ipc/localfortuneclient/localfortuneclient.pro b/examples/ipc/localfortuneclient/localfortuneclient.pro
index a66d4b2eca..ea1d595cda 100644
--- a/examples/ipc/localfortuneclient/localfortuneclient.pro
+++ b/examples/ipc/localfortuneclient/localfortuneclient.pro
@@ -10,5 +10,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneclient
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
-
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/ipc/localfortuneclient/main.cpp b/examples/ipc/localfortuneclient/main.cpp
index 19464d1de3..8e6feeba72 100644
--- a/examples/ipc/localfortuneclient/main.cpp
+++ b/examples/ipc/localfortuneclient/main.cpp
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Client client;
+#if defined(Q_WS_S60)
+ client.showMaximized();
+#else
client.show();
- return client.exec();
+#endif
+ return app.exec();
}