diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2016-11-14 16:35:09 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-12-07 09:48:24 +0000 |
commit | 6644981dfde2ad24186156d5c31a74c686b5557a (patch) | |
tree | 3b732a9a2749a9b4469bea9d98dbc4746a099ebc /src/webengine/api/qquickwebenginedownloaditem_p.h | |
parent | 3d000cfc013158f56c0b088c9ee99b03938ef50b (diff) |
Add DownloadInterruptReason to Q(Quick)WebEngineDownloadItem
Add enum DownloadInterruptReason to BrowserContextAdapterClient,
QWebEngineDownloadItem and QQuickWebEngineDownloadItem. Also add
corresponding attributes to
BrowserContextAdapterClient::DownloadItemInfo,
QWebEngineDownloadItemPrivate and QQuickWebEngineDownloadItemPrivate
as well as getters in QWebEngineDownloadItem and
QQuickWebEngineDownloadItem and interruptReasonChanged signals.
Task-number: QTBUG-56839
Change-Id: I937c14ba0b0884b14ae18ba297024b76dde62605
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebenginedownloaditem_p.h')
-rw-r--r-- | src/webengine/api/qquickwebenginedownloaditem_p.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h index 61e019b9e..ee7ade6e7 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p.h @@ -82,6 +82,37 @@ public: }; Q_ENUM(SavePageFormat) + enum DownloadInterruptReason { + NoReason = 0, + FileFailed = 1, + FileAccessDenied = 2, + FileNoSpace = 3, + FileNameTooLong = 5, + FileTooLarge = 6, + FileVirusInfected = 7, + FileTransientError = 10, + FileBlocked = 11, + FileSecurityCheckFailed = 12, + FileTooShort = 13, + FileHashMismatch = 14, + NetworkFailed = 20, + NetworkTimeout = 21, + NetworkDisconnected = 22, + NetworkServerDown = 23, + NetworkInvalidRequest = 24, + ServerFailed = 30, + //ServerNoRange = 31, + ServerBadContent = 33, + ServerUnauthorized = 34, + ServerCertProblem = 35, + ServerForbidden = 36, + ServerUnreachable = 37, + UserCanceled = 40, + //UserShutdown = 41, + //Crash = 50 + }; + Q_ENUM(DownloadInterruptReason) + enum DownloadType { Attachment = 0, DownloadAttribute, @@ -98,6 +129,7 @@ public: Q_PROPERTY(QString mimeType READ mimeType NOTIFY mimeTypeChanged REVISION 1) Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged) Q_PROPERTY(DownloadType type READ type NOTIFY typeChanged REVISION 3 FINAL) + Q_PROPERTY(DownloadInterruptReason interruptReason READ interruptReason NOTIFY interruptReasonChanged REVISION 4 FINAL) Q_INVOKABLE void accept(); Q_INVOKABLE void cancel(); @@ -112,6 +144,7 @@ public: SavePageFormat savePageFormat() const; void setSavePageFormat(SavePageFormat format); DownloadType type() const; + DownloadInterruptReason interruptReason() const; Q_SIGNALS: void stateChanged(); @@ -121,6 +154,7 @@ Q_SIGNALS: Q_REVISION(1) void mimeTypeChanged(); void pathChanged(); Q_REVISION(3) void typeChanged(); + Q_REVISION(4) void interruptReasonChanged(); private: QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate*, QObject *parent = 0); |