summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginedownloaditem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginewidgets/api/qwebenginedownloaditem.cpp')
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 4a3371904..582f0308c 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -464,6 +464,8 @@ QWebEngineDownloadItem::DownloadType QWebEngineDownloadItem::type() const
/*!
Returns the reason why the download was interrupted.
\since 5.9
+
+ \sa interruptReasonString()
*/
QWebEngineDownloadItem::DownloadInterruptReason QWebEngineDownloadItem::interruptReason() const
@@ -472,6 +474,19 @@ QWebEngineDownloadItem::DownloadInterruptReason QWebEngineDownloadItem::interrup
return d->interruptReason;
}
+/*!
+ Returns a human-readable description of the reason for interrupting the download.
+ \since 5.9
+
+ \sa interruptReason()
+*/
+
+QString QWebEngineDownloadItem::interruptReasonString() const
+{
+ return BrowserContextAdapterClient::downloadInterruptReasonToString(
+ static_cast<BrowserContextAdapterClient::DownloadInterruptReason>(interruptReason()));
+}
+
QWebEngineDownloadItem::QWebEngineDownloadItem(QWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)