summaryrefslogtreecommitdiffstats
path: root/examples/network/bearermonitor
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/network/bearermonitor
parent5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/network/bearermonitor')
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp8
-rw-r--r--examples/network/bearermonitor/bearermonitor.h4
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro9
3 files changed, 14 insertions, 7 deletions
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 942b19ce01..43ae8e9027 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -63,7 +63,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
delete tabWidget->currentWidget();
sessionGroup->hide();
#endif
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI) || defined(Q_WS_SIMULATOR)
setWindowState(Qt::WindowMaximized);
#endif
updateConfigurations();
@@ -87,7 +87,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
this, SLOT(configurationChanged(const QNetworkConfiguration)));
connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
connect(unregisterButton, SIGNAL(clicked()), this, SLOT(unregisterNetwork()));
#else
@@ -226,7 +226,7 @@ void BearerMonitor::updateConfigurations()
if (defaultConfiguration.type() == QNetworkConfiguration::ServiceNetwork)
updateSnapConfiguration(defaultItem, defaultConfiguration);
- } else if (defaultConfiguration.isValid()) {
+ } else {
configurationAdded(defaultConfiguration);
}
@@ -260,7 +260,7 @@ void BearerMonitor::onlineStateChanged(bool isOnline)
onlineState->setText(tr("Offline"));
}
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
void BearerMonitor::registerNetwork()
{
QTreeWidgetItem *item = treeWidget->currentItem();
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index a06522fafa..f4dbf81dee 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -43,7 +43,7 @@
#include <qnetworkconfigmanager.h>
#include <qnetworksession.h>
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_SIMULATOR)
#include "ui_bearermonitor_240_320.h"
#elif defined(MAEMO_UI)
#include "ui_bearermonitor_maemo.h"
@@ -72,7 +72,7 @@ private slots:
void onlineStateChanged(bool isOnline);
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_WS_SIMULATOR)
void registerNetwork();
void unregisterNetwork();
#endif
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
index bd9bd68e5c..a91f064f3e 100644
--- a/examples/network/bearermonitor/bearermonitor.pro
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -23,4 +23,11 @@ wince*:LIBS += -lws2
CONFIG += console
-symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
+symbian: {
+ TARGET.CAPABILITY = NetworkServices ReadUserData
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)