Clarifying the flow of signals on QNetworkAccessManager.
authorJonas M. Gastal <jgastal@profusion.mobi>
Tue, 27 Dec 2011 19:20:04 +0000 (17:20 -0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Dec 2011 15:12:56 +0000 (16:12 +0100)
Task-number: QTBUG-22858

Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/network/access/qnetworkaccessmanager.cpp
src/network/kernel/qauthenticator.cpp

index 2146749..5b6919b 100644 (file)
@@ -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()
 */
 
 /*!
index ec3abdf..3fa2536 100644 (file)
@@ -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)
 {