summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/downloadfiletask_p.h
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-07-01 17:31:11 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-07-09 07:58:58 +0000
commita1a11cf402e3c3a54b4d3af4095a6f579f755df8 (patch)
treed2522d347fb5a31e305fabc4edc8aa5c80e7b263 /src/libs/installer/downloadfiletask_p.h
parentf3c92c9e1cabb9bb1314882e66e3c348242a4211 (diff)
Fix canceling the download done by an external call.
Fix canceling the download on blocking connections without events, it will not trigger the Downloader::testCanceled(). Change-Id: Ia74c70cb1ab98189872d39feb1b9ab47f3ccbd22 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/downloadfiletask_p.h')
-rw-r--r--src/libs/installer/downloadfiletask_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/installer/downloadfiletask_p.h b/src/libs/installer/downloadfiletask_p.h
index a2f2969aa..0aabaefd4 100644
--- a/src/libs/installer/downloadfiletask_p.h
+++ b/src/libs/installer/downloadfiletask_p.h
@@ -42,6 +42,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
+#include <QTimer>
#include <memory>
#include <unordered_map>
@@ -96,7 +97,7 @@ private slots:
void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
void onAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
void onProxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator);
-
+ void onTimeout();
private:
bool testCanceled();
@@ -105,6 +106,7 @@ private:
private:
QFutureInterface<FileTaskResult> *m_futureInterface;
+ QTimer m_timer;
int m_finished;
QNetworkAccessManager m_nam;
QList<FileTaskItem> m_items;