diff options
author | Jussi Witick <jussi.witick@qt.io> | 2018-04-25 11:22:13 +0300 |
---|---|---|
committer | Jussi Witick <jussi.witick@qt.io> | 2018-04-27 07:50:32 +0000 |
commit | 9fdbd9dce917e90f0e644bedd8dca183f88304d6 (patch) | |
tree | ac992e5e784bb7cc6a853986454e04a2b618767f /src/network/access/qnetworkaccessmanager.cpp | |
parent | 6cece0f43a18dc8c9dbf5bc49ce515714f090725 (diff) |
Specify that you need an instance of QNetworkAccessManager per thread
The class is not thread safe, so one instance is not enough for whole
application. Mention that QNetworkAccessManager instance can only be
used from the thread it belongs to because it is a QObject.
Change-Id: I56184e4f8fbd36aca3f6677310431eab88346e6e
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 07644b869f..35e79a69f2 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -178,7 +178,9 @@ static void ensureInitialized() it sends. It contains the proxy and cache configuration, as well as the signals related to such issues, and reply signals that can be used to monitor the progress of a network operation. One QNetworkAccessManager - should be enough for the whole Qt application. + instance should be enough for the whole Qt application. Since + QNetworkAccessManager is based on QObject, it can only be used from the + thread it belongs to. Once a QNetworkAccessManager object has been created, the application can use it to send requests over the network. A group of standard functions |