summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-01-04 23:06:49 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-01-04 23:45:12 (GMT)
commit31e6fc5ae7f7fbe2f23b519cb76dcc579dac1f41 (patch)
tree0f013fe0a7407737aac96d8d0dab5ccf83815261 /tests/manual
parent0f31f63e11d4fcb2b399979de28368a89275b911 (diff)
downloadQt-31e6fc5ae7f7fbe2f23b519cb76dcc579dac1f41.zip
Qt-31e6fc5ae7f7fbe2f23b519cb76dcc579dac1f41.tar.gz
Qt-31e6fc5ae7f7fbe2f23b519cb76dcc579dac1f41.tar.bz2
Bearer Management Integration 2.
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/bearerex/bearerex.cpp37
-rw-r--r--tests/manual/bearerex/bearerex.h3
-rw-r--r--tests/manual/bearerex/bearerex.pro11
-rw-r--r--tests/manual/networkmanager/networkmanager.pro3
-rw-r--r--tests/manual/networkmanager/nmview.cpp2
-rw-r--r--tests/manual/networkmanager/nmview.h2
6 files changed, 26 insertions, 32 deletions
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index 68590cc..f62d8d2 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -69,10 +69,6 @@ void BearerEx::createMenus()
menuBar()->addAction(act1);
connect(act1, SIGNAL(triggered()), this, SLOT(on_showDetailsButton_clicked()));
- m_openAction = new QAction(tr("Open Session"), this);
- menuBar()->addAction(m_openAction);
- connect(m_openAction, SIGNAL(triggered()), this, SLOT(on_openSessionButton_clicked()));
-
QAction* exitAct = new QAction(tr("Exit"), this);
menuBar()->addAction(exitAct);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
@@ -290,7 +286,7 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
} else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
}
- bearerLineEdit->setText(m_NetworkSession->bearerName());
+ bearerLineEdit->setText(apNetworkConfiguration->bearerName());
sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
QString(" / ")+
QString::number(m_NetworkSession->bytesReceived()));
@@ -341,7 +337,7 @@ void SessionTab::on_sendRequestButton_clicked()
void SessionTab::on_openSessionButton_clicked()
{
m_NetworkSession->open();
- if (m_NetworkSession->isActive()) {
+ if (m_NetworkSession->isOpen()) {
newState(m_NetworkSession->state());
}
}
@@ -349,7 +345,7 @@ void SessionTab::on_openSessionButton_clicked()
void SessionTab::on_closeSessionButton_clicked()
{
m_NetworkSession->close();
- if (!m_NetworkSession->isActive()) {
+ if (!m_NetworkSession->isOpen()) {
newState(m_NetworkSession->state());
}
}
@@ -418,7 +414,7 @@ void SessionTab::opened()
listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Opened"));
m_eventListWidget->addItem(listItem);
- QVariant identifier = m_NetworkSession->property("ActiveConfigurationIdentifier");
+ QVariant identifier = m_NetworkSession->property("ActiveConfiguration");
if (!identifier.isNull()) {
QString configId = identifier.toString();
QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
@@ -428,7 +424,7 @@ void SessionTab::opened()
}
if (m_NetworkSession->configuration().type() == QNetworkConfiguration::UserChoice) {
- QVariant identifier = m_NetworkSession->property("UserChoiceConfigurationIdentifier");
+ QVariant identifier = m_NetworkSession->property("UserChoiceConfiguration");
if (!identifier.isNull()) {
QString configId = identifier.toString();
QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
@@ -490,22 +486,21 @@ void SessionTab::stateChanged(QNetworkSession::State state)
void SessionTab::newState(QNetworkSession::State state)
{
- if (state == QNetworkSession::Connected) {
- QVariant identifier = m_NetworkSession->property("ActiveConfigurationIdentifier");
- if (!identifier.isNull()) {
- QString configId = identifier.toString();
- QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
- if (config.isValid()) {
- iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
- }
+ QVariant identifier = m_NetworkSession->property("ActiveConfiguration");
+ if (state == QNetworkSession::Connected && !identifier.isNull()) {
+ QString configId = identifier.toString();
+ QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
+ if (config.isValid()) {
+ iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
+ bearerLineEdit->setText(config.bearerName());
}
+ } else {
+ bearerLineEdit->setText(m_NetworkSession->configuration().bearerName());
}
- bearerLineEdit->setText(m_NetworkSession->bearerName());
-
QString active;
- if (m_NetworkSession->isActive()) {
- active = " (A)";
+ if (m_NetworkSession->isOpen()) {
+ active = " (O)";
}
stateLineEdit->setText(stateString(state)+active);
}
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
index f18180e..b8a2393 100644
--- a/tests/manual/bearerex/bearerex.h
+++ b/tests/manual/bearerex/bearerex.h
@@ -51,7 +51,10 @@
#include "qnetworksession.h"
#include "xqlistwidget.h"
+QT_BEGIN_NAMESPACE
class QHttp;
+QT_END_NAMESPACE
+
class SessionTab;
QTM_USE_NAMESPACE
diff --git a/tests/manual/bearerex/bearerex.pro b/tests/manual/bearerex/bearerex.pro
index a870eb1..e480d43 100644
--- a/tests/manual/bearerex/bearerex.pro
+++ b/tests/manual/bearerex/bearerex.pro
@@ -24,11 +24,6 @@ SOURCES += bearerex.cpp \
main.cpp \
xqlistwidget.cpp
-symbian: {
- bearerex.sources = Qtbearer.dll
- bearerex.path = /sys/bin
- DEPLOYMENT += bearerex
-
- TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
-}
-qtAddLibrary(QtBearer)
+CONFIG += mobility
+MOBILITY = bearer
+symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
diff --git a/tests/manual/networkmanager/networkmanager.pro b/tests/manual/networkmanager/networkmanager.pro
index 31b2af1..7ff370a 100644
--- a/tests/manual/networkmanager/networkmanager.pro
+++ b/tests/manual/networkmanager/networkmanager.pro
@@ -12,7 +12,8 @@ requires(contains(QT_CONFIG,dbus))
INCLUDEPATH += ../../src/bearer
include(../../common.pri)
-qtAddLibrary(QtBearer)
+CONFIG += mobility
+MOBILITY = bearer
#MOC_DIR = .moc
#OBJECTS_DIR = .obj
diff --git a/tests/manual/networkmanager/nmview.cpp b/tests/manual/networkmanager/nmview.cpp
index ca9d907..fde5cae 100644
--- a/tests/manual/networkmanager/nmview.cpp
+++ b/tests/manual/networkmanager/nmview.cpp
@@ -188,8 +188,6 @@ void NMView::getActiveConnections()
void NMView::update()
{
-// if(sess)
-// qWarning() << __FUNCTION__<< sess->bytesWritten() << sess->bearerName();
// QNetworkManagerInterface *dbIface;
// dbIface = new QNetworkManagerInterface;
// QList <QDBusObjectPath> connections = dbIface->activeConnections();
diff --git a/tests/manual/networkmanager/nmview.h b/tests/manual/networkmanager/nmview.h
index 641385e..e15aacd 100644
--- a/tests/manual/networkmanager/nmview.h
+++ b/tests/manual/networkmanager/nmview.h
@@ -49,9 +49,11 @@
QTM_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class QListWidget;
class QTreeWidget;
class QTreeWidgetItem;
+QT_END_NAMESPACE
class NMView : public QDialog, private Ui::Dialog
{