summaryrefslogtreecommitdiffstats
path: root/examples/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ipc')
-rw-r--r--examples/ipc/ipc.pro1
-rw-r--r--examples/ipc/localfortuneclient/client.cpp5
-rw-r--r--examples/ipc/localfortuneclient/client.h9
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.desktop11
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro5
-rw-r--r--examples/ipc/localfortuneclient/main.cpp6
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.desktop11
-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
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.desktop11
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro5
13 files changed, 82 insertions, 4 deletions
diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro
index ed20b2627c..a9dd9c172e 100644
--- a/examples/ipc/ipc.pro
+++ b/examples/ipc/ipc.pro
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc
INSTALLS += sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
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.desktop b/examples/ipc/localfortuneclient/localfortuneclient.desktop
new file mode 100644
index 0000000000..556ff4795d
--- /dev/null
+++ b/examples/ipc/localfortuneclient/localfortuneclient.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Local Fortune Client
+Exec=/opt/usr/bin/localfortuneclient
+Icon=localfortuneclient
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
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();
}
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.desktop b/examples/ipc/localfortuneserver/localfortuneserver.desktop
new file mode 100644
index 0000000000..74f485049a
--- /dev/null
+++ b/examples/ipc/localfortuneserver/localfortuneserver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Local Fortune Server
+Exec=/opt/usr/bin/localfortuneserver
+Icon=localfortuneserver
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
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
diff --git a/examples/ipc/sharedmemory/sharedmemory.desktop b/examples/ipc/sharedmemory/sharedmemory.desktop
new file mode 100644
index 0000000000..118ded97cd
--- /dev/null
+++ b/examples/ipc/sharedmemory/sharedmemory.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Shared Memory
+Exec=/opt/usr/bin/sharedmemory
+Icon=sharedmemory
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro
index 252fb29ca1..9202cb7b7a 100644
--- a/examples/ipc/sharedmemory/sharedmemory.pro
+++ b/examples/ipc/sharedmemory/sharedmemory.pro
@@ -13,3 +13,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/sharedmemory
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)