summaryrefslogtreecommitdiffstats
path: root/examples/ipc/localfortuneserver
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/localfortuneserver
parent5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/ipc/localfortuneserver')
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.pro3
-rw-r--r--examples/ipc/localfortuneserver/main.cpp6
-rw-r--r--examples/ipc/localfortuneserver/server.cpp5
-rw-r--r--examples/ipc/localfortuneserver/server.h8
4 files changed, 20 insertions, 2 deletions
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.pro b/examples/ipc/localfortuneserver/localfortuneserver.pro
index ae09d8007c..55857cf56e 100644
--- a/examples/ipc/localfortuneserver/localfortuneserver.pro
+++ b/examples/ipc/localfortuneserver/localfortuneserver.pro
@@ -10,5 +10,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneserver
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
-
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/ipc/localfortuneserver/main.cpp b/examples/ipc/localfortuneserver/main.cpp
index 6c0e9ee9f3..fc0c698156 100644
--- a/examples/ipc/localfortuneserver/main.cpp
+++ b/examples/ipc/localfortuneserver/main.cpp
@@ -49,7 +49,11 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Server server;
+#if defined(Q_WS_S60)
+ server.showMaximized();
+#else
server.show();
+#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
- return server.exec();
+ return app.exec();
}
diff --git a/examples/ipc/localfortuneserver/server.cpp b/examples/ipc/localfortuneserver/server.cpp
index 88784d440e..08dd31d81e 100644
--- a/examples/ipc/localfortuneserver/server.cpp
+++ b/examples/ipc/localfortuneserver/server.cpp
@@ -48,9 +48,14 @@
#include <qlocalsocket.h>
Server::Server(QWidget *parent)
+#ifdef Q_WS_MAEMO_5
+ : QWidget(parent)
+#else
: QDialog(parent)
+#endif
{
statusLabel = new QLabel;
+ statusLabel->setWordWrap(true);
quitButton = new QPushButton(tr("Quit"));
quitButton->setAutoDefault(false);
diff --git a/examples/ipc/localfortuneserver/server.h b/examples/ipc/localfortuneserver/server.h
index 5f00ba4d2d..313862cfaa 100644
--- a/examples/ipc/localfortuneserver/server.h
+++ b/examples/ipc/localfortuneserver/server.h
@@ -41,7 +41,11 @@
#ifndef SERVER_H
#define SERVER_H
+#ifdef Q_WS_MAEMO_5
+#include <QWidget>
+#else
#include <QDialog>
+#endif
QT_BEGIN_NAMESPACE
class QLabel;
@@ -49,7 +53,11 @@ class QPushButton;
class QLocalServer;
QT_END_NAMESPACE
+#ifdef Q_WS_MAEMO_5
+class Server : public QWidget
+#else
class Server : public QDialog
+#endif
{
Q_OBJECT