summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro8
-rw-r--r--examples/network/fortuneserver/main.cpp11
-rw-r--r--examples/network/fortuneserver/server.cpp9
3 files changed, 26 insertions, 2 deletions
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index 8cf52ee..ea37b58 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -10,3 +10,11 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneserver
INSTALLS += target sources
include($$QT_SOURCE_TREE/examples/examplebase.pri)
+
+symbian {
+ HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h
+ LIBS += -lesock
+ TARGET.UID3 = 0xA000CF71
+ TARGET.CAPABILITY = "All -TCB"
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+} \ No newline at end of file
diff --git a/examples/network/fortuneserver/main.cpp b/examples/network/fortuneserver/main.cpp
index d742fb1..3394c1c 100644
--- a/examples/network/fortuneserver/main.cpp
+++ b/examples/network/fortuneserver/main.cpp
@@ -46,11 +46,22 @@
#include "server.h"
+#ifdef Q_OS_SYMBIAN
+#include "sym_iap_util.h"
+#endif
+
int main(int argc, char *argv[])
{
+#ifdef Q_OS_SYMBIAN
+ qt_SetDefaultIap();
+#endif
QApplication app(argc, argv);
Server server;
+#ifdef Q_OS_SYMBIAN
+ server.showMaximized();
+#else
server.show();
+#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return server.exec();
}
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index a102ef2..5da43ab 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -63,10 +63,15 @@ Server::Server(QWidget *parent)
return;
}
//! [0]
+ QList<QHostAddress> ipAddresseList = QNetworkInterface::allAddresses();
+ QString ipAddresses;
+ for (int i = 0; i < ipAddresseList.size(); ++i) {
+ ipAddresses.append(ipAddresseList.at(i).toString()).append("\n");
+ }
- statusLabel->setText(tr("The server is running on port %1.\n"
+ statusLabel->setText(tr("The server is running on \n IP: \n%1 PORT: \n%2\n"
"Run the Fortune Client example now.")
- .arg(tcpServer->serverPort()));
+ .arg(ipAddresses).arg(tcpServer->serverPort()));
//! [1]
//! [2]