##// END OF EJS Templates
Empty passwd storing hash map in downloader once download is complete...
jeandet -
r1344:213f5ecfb65d
parent child
Show More
@@ -60,6 +60,8 public:
60 QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
60 QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
61 Response resp = Response(reply->readAll(), status_code.toInt());
61 Response resp = Response(reply->readAll(), status_code.toInt());
62 delete reply;
62 delete reply;
63 if(user!="" and passwd!="")
64 auth.remove(url);
63 return resp;
65 return resp;
64 }
66 }
65
67
@@ -68,7 +70,7 public:
68 auto uuid = QUuid::createUuid();
70 auto uuid = QUuid::createUuid();
69 QNetworkRequest request = buildRequest(url, user, passwd);
71 QNetworkRequest request = buildRequest(url, user, passwd);
70 QNetworkReply *reply = manager.get(request);
72 QNetworkReply *reply = manager.get(request);
71 auto callback_wrapper = [uuid, callback, this](){
73 auto callback_wrapper = [url, uuid, callback, this](){
72 QNetworkReply* reply;
74 QNetworkReply* reply;
73 {
75 {
74 QWriteLocker locker(&pending_requests_lock);
76 QWriteLocker locker(&pending_requests_lock);
@@ -76,6 +78,7 public:
76 }
78 }
77 QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
79 QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
78 Response resp = Response(reply->readAll(), status_code.toInt());
80 Response resp = Response(reply->readAll(), status_code.toInt());
81 auth.remove(url);
79 delete reply;
82 delete reply;
80 callback(uuid, resp);
83 callback(uuid, resp);
81 };
84 };
General Comments 0
You need to be logged in to leave comments. Login now