@@ -98,6 +98,9 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const | |||
|
98 | 98 | = [this, dateTime, tempFile, token](QNetworkReply *reply, QUuid dataId) noexcept { |
|
99 | 99 | Q_UNUSED(dataId); |
|
100 | 100 | |
|
101 | // Don't do anything if the reply was abort | |
|
102 | if (reply->error() != QNetworkReply::OperationCanceledError) { | |
|
103 | ||
|
101 | 104 | if (tempFile) { |
|
102 | 105 | auto replyReadAll = reply->readAll(); |
|
103 | 106 | if (!replyReadAll.isEmpty()) { |
@@ -113,12 +116,14 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const | |||
|
113 | 116 | /// @todo ALX : debug |
|
114 | 117 | } |
|
115 | 118 | } |
|
116 | ||
|
119 | } | |
|
117 | 120 | |
|
118 | 121 | }; |
|
119 | auto httpFinishedLambda = [this, httpDownloadFinished, tempFile](QNetworkReply *reply, | |
|
120 | QUuid dataId) noexcept { | |
|
122 | auto httpFinishedLambda | |
|
123 | = [this, httpDownloadFinished, tempFile](QNetworkReply *reply, QUuid dataId) noexcept { | |
|
121 | 124 | |
|
125 | // Don't do anything if the reply was abort | |
|
126 | if (reply->error() != QNetworkReply::OperationCanceledError) { | |
|
122 | 127 | auto downloadFileUrl = QUrl{QString{reply->readAll()}}; |
|
123 | 128 | |
|
124 | 129 | |
@@ -127,7 +132,9 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const | |||
|
127 | 132 | // Creates destination file |
|
128 | 133 | if (tempFile->open()) { |
|
129 | 134 | // Executes request |
|
130 |
emit requestConstructed(QNetworkRequest{downloadFileUrl}, dataId, |
|
|
135 | emit requestConstructed(QNetworkRequest{downloadFileUrl}, dataId, | |
|
136 | httpDownloadFinished); | |
|
137 | } | |
|
131 | 138 | } |
|
132 | 139 | }; |
|
133 | 140 |
General Comments 0
You need to be logged in to leave comments.
Login now