diff options
Diffstat (limited to 'examples/ipc/localfortuneserver')
-rw-r--r-- | examples/ipc/localfortuneserver/localfortuneserver.desktop | 11 | ||||
-rw-r--r-- | examples/ipc/localfortuneserver/localfortuneserver.pro | 3 | ||||
-rw-r--r-- | examples/ipc/localfortuneserver/main.cpp | 6 | ||||
-rw-r--r-- | examples/ipc/localfortuneserver/server.cpp | 5 | ||||
-rw-r--r-- | examples/ipc/localfortuneserver/server.h | 8 |
5 files changed, 31 insertions, 2 deletions
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.desktop b/examples/ipc/localfortuneserver/localfortuneserver.desktop new file mode 100644 index 0000000..74f4850 --- /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 e14ec8e..313fb79 100644 --- a/examples/ipc/localfortuneserver/localfortuneserver.pro +++ b/examples/ipc/localfortuneserver/localfortuneserver.pro @@ -10,5 +10,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneserver INSTALLS += target sources 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/localfortuneserver/main.cpp b/examples/ipc/localfortuneserver/main.cpp index 6c0e9ee..fc0c698 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 88784d4..08dd31d 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 5f00ba4..313862c 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 |