8 Commits

Author SHA1 Message Date
Nyall Dawson
03a2a03dcf Dox 2019-02-01 21:44:53 +11:00
Nyall Dawson
4908ef1641 Revert "Revert QgsBlockingNetworkRequest"
With recent changes in QgsNetworkAccessManager this should be
safe to resurrect (fingers crossed!). Also simplify code a lot,
because now QgsNetworkAccessManager handles waking the worker
thread after the auth request is handled.

Add a lot more tests
2019-02-01 21:44:53 +11:00
Nyall Dawson
e50d9a1673 Make request a member of reply 2019-01-24 06:10:37 +11:00
Nyall Dawson
ea1971fdf8 Add an unique id to requests, which can be used to link them to responses 2019-01-24 06:10:37 +11:00
Nyall Dawson
b5379ce055 New class QgsNetworkReplyContent, which encapsulates the useful
information from a QNetworkReply in a container which is safe
and cheap to pass between threads

(QNetworkReplys are QObject based, so not safe to access or
pass between threads)

Use this new class in a thread safe QgsNetworkAccessManager::finished
signal, which is fired on the main thread QgsNetworkAccessManager instance
when responses are finished from any thread
2019-01-24 06:10:37 +11:00
Nyall Dawson
f301f944bd Revert QgsBlockingNetworkRequest
Too many issues... I'm unsure if this is even possible now...
2018-12-23 20:19:03 +10:00
Nyall Dawson
a457482de8 Add attributes to QgsNetworkReplyContent 2018-12-21 09:05:45 +10:00
Nyall Dawson
e4959a6b9a New class QgsNetworkReplyContent
Encapsulates a network reply within a container which
is inexpensive to copy and safe to pass around between threads.
The default Qt QNetworkReply class is a QObject, which prevents
it from being copied and passed between threads. This class
grabs all the useful information from a QNetworkReply,
allowing the reply's content to be stored indefinetly without
concern for the lifetime of the QNetworkReply object itself.
2018-12-21 09:05:45 +10:00