summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-07-24 08:42:15 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-07-24 08:46:03 (GMT)
commitf90aba898074dbd1edc07112b63b8816bbc5855c (patch)
tree00e935bef906fee018fa8f3ad43ab5e147572e4b /src/network
parent9dadc219814cd9baaa4be4cee6ee2b3cf7df4a19 (diff)
downloadQt-f90aba898074dbd1edc07112b63b8816bbc5855c.zip
Qt-f90aba898074dbd1edc07112b63b8816bbc5855c.tar.gz
Qt-f90aba898074dbd1edc07112b63b8816bbc5855c.tar.bz2
QNAM: Clarify docs about when a QNetworkReply can be deleted
Task-number: 258644 Reviewed-by: Thiago
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp9
-rw-r--r--src/network/access/qnetworkreply.cpp9
2 files changed, 16 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 748d893..8eb2c1b 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -121,7 +121,9 @@ static void ensureInitialized()
as well as meta-data (headers, etc.).
\note After the request has finished, it is the responsibility of the user
- to delete the QNetworkReply object at an appropriate time.
+ to delete the QNetworkReply object at an appropriate time. Do not directly
+ delete it inside the slot connected to finished(). You can use the
+ deleteLater() function.
A more involved example, assuming the manager is already existent,
can be:
@@ -199,6 +201,9 @@ static void ensureInitialized()
See QNetworkReply::finished() for information on the status that
the object will be in.
+ \note Do not delete the \a reply object in the slot connected to this
+ signal. Use deleteLater().
+
\sa QNetworkReply::finished(), QNetworkReply::error()
*/
@@ -573,7 +578,7 @@ QNetworkReply *QNetworkAccessManager::get(const QNetworkRequest &request)
The returned QNetworkReply object will be open for reading and
will contain the reply sent by the server to the POST request.
- Note: sending a POST request on protocols other than HTTP and
+ \note sending a POST request on protocols other than HTTP and
HTTPS is undefined and will probably fail.
\sa get(), put()
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index c655918..a7a77cb 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -87,6 +87,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
indicates the progress of the upload for operations that have such
content.
+ \note Do not delete the object in the slot connected to the
+ error() or finished() signal. Use deleteLater().
+
\sa QNetworkRequest, QNetworkAccessManager
*/
@@ -228,6 +231,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
QNetworkAccessManager::finished() where that signal's reply
parameter is this object.
+ \note Do not delete the object in the slot connected to this
+ signal. Use deleteLater().
+
\sa QNetworkAccessManager::finished()
*/
@@ -242,6 +248,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
detected. Call errorString() to obtain a textual representation of
the error condition.
+ \note Do not delete the object in the slot connected to this
+ signal. Use deleteLater().
+
\sa error(), errorString()
*/