From 7dffcf8a74de16c977ddff930dd17973d2abdf9d Mon Sep 17 00:00:00 2001 From: "Jonas M. Gastal" Date: Tue, 27 Dec 2011 17:20:04 -0200 Subject: Clarifying the flow of signals on QNetworkAccessManager. Task-number: QTBUG-22858 Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c Reviewed-by: Thiago Macieira --- src/network/access/qnetworkaccessmanager.cpp | 7 ++++++- src/network/kernel/qauthenticator.cpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 2146749ea5..5b6919bc33 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -285,11 +285,16 @@ static void ensureInitialized() again, without emitting the authenticationRequired() signal. If it rejects the credentials, this signal will be emitted again. + \note To have the request not send credentials you must not call + setUser() or setPassword() on the \a authenticator object. This + will result in the the \l finished() signal being emitted with a + \l QNetworkReply with error \l AuthenticationRequiredError. + \note It is not possible to use a QueuedConnection to connect to this signal, as the connection will fail if the authenticator has not been filled in with new information when the signal returns. - \sa proxyAuthenticationRequired() + \sa proxyAuthenticationRequired(), QAuthenticator::setUser(), QAuthenticator::setPassword() */ /*! diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index ec3abdf029..3fa25368bb 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -206,6 +206,8 @@ QString QAuthenticator::user() const /*! Sets the \a user used for authentication. + + \sa QNetworkAccessManager::authenticationRequired() */ void QAuthenticator::setUser(const QString &user) { @@ -244,6 +246,8 @@ QString QAuthenticator::password() const /*! Sets the \a password used for authentication. + + \sa QNetworkAccessManager::authenticationRequired() */ void QAuthenticator::setPassword(const QString &password) { -- cgit v1.2.3