summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebenginedownloaditem_p.h
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2016-03-30 13:25:19 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2016-06-22 08:28:53 +0000
commit637f34d38b97cbfd5faf407756b32986a2607543 (patch)
treef69616c1983bcf1c3e569b6dd483ccf18ed2d767 /src/webengine/api/qquickwebenginedownloaditem_p.h
parent349e96d833493faaba2cd879e31811f07507cc37 (diff)
Add a DownloadType enum property to WebEngineDownloadItem
With this property the user gets the requested download's type. In other words, the user can identify the download where it comes from based on the type. Update public API list as well. Change-Id: I2b066d7eb4df1134266ad67ade0066e3bcc2b454 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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h
index 0b01fe6fc..61e019b9e 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p.h
@@ -82,6 +82,14 @@ public:
};
Q_ENUM(SavePageFormat)
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+ Q_ENUM(DownloadType)
+
Q_PROPERTY(quint32 id READ id CONSTANT FINAL)
Q_PROPERTY(DownloadState state READ state NOTIFY stateChanged)
Q_PROPERTY(SavePageFormat savePageFormat READ savePageFormat WRITE setSavePageFormat NOTIFY savePageFormatChanged REVISION 2 FINAL)
@@ -89,6 +97,7 @@ public:
Q_PROPERTY(qint64 receivedBytes READ receivedBytes NOTIFY receivedBytesChanged)
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_INVOKABLE void accept();
Q_INVOKABLE void cancel();
@@ -102,6 +111,7 @@ public:
void setPath(QString path);
SavePageFormat savePageFormat() const;
void setSavePageFormat(SavePageFormat format);
+ DownloadType type() const;
Q_SIGNALS:
void stateChanged();
@@ -110,6 +120,7 @@ Q_SIGNALS:
void totalBytesChanged();
Q_REVISION(1) void mimeTypeChanged();
void pathChanged();
+ Q_REVISION(3) void typeChanged();
private:
QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate*, QObject *parent = 0);