diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-05-13 00:49:52 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-05-14 03:02:28 (GMT) |
commit | e6efa3ea81dff9eb0ade1c2ba868c272ccfcc958 (patch) | |
tree | 0c4f50afef9228ae047ab02205af7b8a038b84dc /examples/network/bearermonitor/sessionwidget.cpp | |
parent | 08b6114240a6c02dbeb0297d0deeb538ebc3fde9 (diff) | |
download | Qt-e6efa3ea81dff9eb0ade1c2ba868c272ccfcc958.zip Qt-e6efa3ea81dff9eb0ade1c2ba868c272ccfcc958.tar.gz Qt-e6efa3ea81dff9eb0ade1c2ba868c272ccfcc958.tar.bz2 |
Bearer management changes from Qt Mobility.
9286bfcc43d38e0cb3bfd1d3f99ac7ab5d88b7e3
Diffstat (limited to 'examples/network/bearermonitor/sessionwidget.cpp')
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp index 443f4b2..3a8e5ea 100644 --- a/examples/network/bearermonitor/sessionwidget.cpp +++ b/examples/network/bearermonitor/sessionwidget.cpp @@ -59,7 +59,7 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren connect(session, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateSession())); connect(session, SIGNAL(error(QNetworkSession::SessionError)), - this, SLOT(updateSession())); + this, SLOT(updateSessionError(QNetworkSession::SessionError))); updateSession(); @@ -105,7 +105,6 @@ void SessionWidget::deleteSession() void SessionWidget::updateSession() { updateSessionState(session->state()); - updateSessionError(session->error()); if (session->state() == QNetworkSession::Connected) statsTimer = startTimer(1000); @@ -128,12 +127,14 @@ void SessionWidget::updateSession() void SessionWidget::openSession() { + clearError(); session->open(); updateSession(); } void SessionWidget::openSyncSession() { + clearError(); session->open(); session->waitForOpened(); updateSession(); @@ -141,12 +142,14 @@ void SessionWidget::openSyncSession() void SessionWidget::closeSession() { + clearError(); session->close(); updateSession(); } void SessionWidget::stopSession() { + clearError(); session->stop(); updateSession(); } @@ -195,3 +198,8 @@ void SessionWidget::updateSessionError(QNetworkSession::SessionError error) errorString->setText(session->errorString()); } +void SessionWidget::clearError() +{ + lastError->clear(); + errorString->clear(); +} |