diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-10-25 10:54:16 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-10-25 10:54:16 (GMT) |
commit | cb50699b39e016a64a2a06088042622546c428a2 (patch) | |
tree | 77d269a3103a6c140098b9caaafd17a29a81addd /src/network | |
parent | 89807f70656b95c1568ef183dd7f28c527fc3eaa (diff) | |
parent | 890c1110ec5e39bb6e63e99fe09c296c1ea824be (diff) | |
download | Qt-cb50699b39e016a64a2a06088042622546c428a2.zip Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.gz Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
demos/declarative/snake/snake.qml
qmake/generators/symbian/symbiancommon.cpp
src/network/access/qnetworkaccessmanager.cpp
src/s60installs/s60installs.pro
tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 14 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager.cpp | 38 | ||||
-rw-r--r-- | src/network/bearer/qnetworksession.cpp | 8 | ||||
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 7 |
4 files changed, 50 insertions, 17 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 617602d..74c5844 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -103,12 +103,22 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(_q_readyRead()), Qt::DirectConnection); + + // The disconnected() and error() signals may already come + // while calling connectToHost(). + // In case of a cached hostname or an IP this + // will then emit a signal to the user of QNetworkReply + // but cannot be caught because the user did not have a chance yet + // to connect to QNetworkReply's signals. + qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError"); QObject::connect(socket, SIGNAL(disconnected()), this, SLOT(_q_disconnected()), - Qt::DirectConnection); + Qt::QueuedConnection); QObject::connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(_q_error(QAbstractSocket::SocketError)), - Qt::DirectConnection); + Qt::QueuedConnection); + + #ifndef QT_NO_NETWORKPROXY QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(_q_proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 23d7800..4c149a2 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -229,8 +229,8 @@ QNetworkConfigurationManager::QNetworkConfigurationManager( QObject* parent ) QNetworkConfigurationManager::~QNetworkConfigurationManager() { QNetworkConfigurationManagerPrivate *priv = connManager(); - - priv->disablePolling(); + if (priv) + priv->disablePolling(); } @@ -245,7 +245,11 @@ QNetworkConfigurationManager::~QNetworkConfigurationManager() */ QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const { - return connManager()->defaultConfiguration(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->defaultConfiguration(); + + return QNetworkConfiguration(); } /*! @@ -275,7 +279,11 @@ QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const */ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const { - return connManager()->allConfigurations(filter); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->allConfigurations(filter); + + return QList<QNetworkConfiguration>(); } /*! @@ -286,7 +294,11 @@ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNe */ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(const QString &identifier) const { - return connManager()->configurationFromIdentifier(identifier); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->configurationFromIdentifier(identifier); + + return QNetworkConfiguration(); } /*! @@ -301,7 +313,11 @@ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier( */ bool QNetworkConfigurationManager::isOnline() const { - return connManager()->isOnline(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->isOnline(); + + return false; } /*! @@ -309,7 +325,11 @@ bool QNetworkConfigurationManager::isOnline() const */ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const { - return connManager()->capabilities(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->capabilities(); + + return QNetworkConfigurationManager::Capabilities(0); } /*! @@ -328,7 +348,9 @@ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabil */ void QNetworkConfigurationManager::updateConfigurations() { - connManager()->performAsyncConfigurationUpdate(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + priv->performAsyncConfigurationUpdate(); } #include "moc_qnetworkconfigmanager.cpp" diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 65de539..226c3c5 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -489,15 +489,15 @@ QString QNetworkSession::errorString() const configuration resolved to when \l open() was called; otherwise an empty string. The purpose of this key is to determine the real QNetworkConfiguration that the - session is using. This key is different to \i ActiveConfiguration in that + session is using. This key is different from \e ActiveConfiguration in that this key may return an identifier for either a \l {QNetworkConfiguration::ServiceNetwork}{service network} or a - \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations - whereas \i ActiveConfiguration always returns identifiers to + \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations, + whereas \e ActiveConfiguration always returns identifiers to \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations. \row \o ConnectInBackground - \o Setting this property to \i true before calling \l open() implies that the connection attempt + \o Setting this property to \e true before calling \l open() implies that the connection attempt is made but if no connection can be established, the user is not connsulted and asked to select a suitable connection. This property is not set by default and support for it depends on the platform. diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index f8f67bb..1760b53 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -485,9 +485,10 @@ void QSslConfiguration::setCiphers(const QList<QSslCipher> &ciphers) /*! Returns this connection's CA certificate database. The CA certificate database is used by the socket during the handshake phase to - validate the peer's certificate. It can be moodified prior to the - handshake with addCaCertificate(), addCaCertificates(), and - setCaCertificates(). + validate the peer's certificate. It can be modified prior to the + handshake with setCaCertificates(), or with \l{QSslSocket}'s + \l{QSslSocket::}{addCaCertificate()} and + \l{QSslSocket::}{addCaCertificates()}. \sa setCaCertificates() */ |