From 36f800ae4f9131345e527b78e33eeb2c7701794a Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Sep 2010 11:05:23 +1000 Subject: An aborted QNetworkSession on Maemo must emit SessionAbortedError. Currently it emits InvalidConfigurationError Task-number: QTMOBILITY-514 Reviewed-by: Aaron McCarthy --- src/plugins/bearer/icd/qnetworksession_impl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 2ed0b88..37434e3 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -794,7 +794,7 @@ void QNetworkSessionPrivateImpl::stateChange(const QDBusMessage& rep) qDebug() << "connect to"<< publicConfig.identifier() << "failed, result is empty"; #endif updateState(QNetworkSession::Disconnected); - emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError); + emit QNetworkSessionPrivate::error(QNetworkSession::SessionAbortedError); if (publicConfig.type() == QNetworkConfiguration::UserChoice) copyConfig(publicConfig, activeConfig); return; @@ -808,7 +808,7 @@ void QNetworkSessionPrivateImpl::stateChange(const QDBusMessage& rep) if ((publicConfig.type() != QNetworkConfiguration::UserChoice) && (connected_iap != config.identifier())) { updateState(QNetworkSession::Disconnected); - emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError); + emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError); return; } @@ -1026,6 +1026,9 @@ QString QNetworkSessionPrivateImpl::errorString() const case QNetworkSession::SessionAbortedError: errorStr = QNetworkSessionPrivateImpl::tr("Session aborted by user or system"); break; + case QNetworkSession::InvalidConfigurationError: + errorStr = QNetworkSessionPrivateImpl::tr("The specified configuration cannot be used."); + break; default: case QNetworkSession::UnknownSessionError: errorStr = QNetworkSessionPrivateImpl::tr("Unidentified Error"); -- cgit v0.12