summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginedownloaditem.cpp
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-06-11 14:06:13 +0200
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-06-12 09:26:58 +0000
commit0b65f3ca378810d3b33345b99bf084124acf3e5f (patch)
tree3f2857dfd9c98498d8be92607a11a2a4f023ab41 /src/webenginewidgets/api/qwebenginedownloaditem.cpp
parente0e74a0a9286bb92ae7e2e2395827538133d2bf0 (diff)
Last minute API review cleanup
The getters in QWebEngineDownloadItem were not const. The script collection in QWebEngineProfile was passed by reference, which is not idiomatic of Qt. Change-Id: I9b4218b407288b91a726a711bd2a7e1c1167d99a Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginedownloaditem.cpp')
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 703570587..7df044e66 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -156,9 +156,9 @@ void QWebEngineDownloadItem::cancel()
Returns the download item's id.
*/
-quint32 QWebEngineDownloadItem::id()
+quint32 QWebEngineDownloadItem::id() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->downloadId;
}
@@ -205,9 +205,9 @@ quint32 QWebEngineDownloadItem::id()
\sa QWebEngineDownloadItem::DownloadState
*/
-QWebEngineDownloadItem::DownloadState QWebEngineDownloadItem::state()
+QWebEngineDownloadItem::DownloadState QWebEngineDownloadItem::state() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->downloadState;
}
@@ -217,9 +217,9 @@ QWebEngineDownloadItem::DownloadState QWebEngineDownloadItem::state()
-1 means the size is unknown.
*/
-qint64 QWebEngineDownloadItem::totalBytes()
+qint64 QWebEngineDownloadItem::totalBytes() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->totalBytes;
}
@@ -229,9 +229,9 @@ qint64 QWebEngineDownloadItem::totalBytes()
-1 means the size is unknown.
*/
-qint64 QWebEngineDownloadItem::receivedBytes()
+qint64 QWebEngineDownloadItem::receivedBytes() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->receivedBytes;
}
@@ -239,9 +239,9 @@ qint64 QWebEngineDownloadItem::receivedBytes()
Returns the download's origin url.
*/
-QUrl QWebEngineDownloadItem::url()
+QUrl QWebEngineDownloadItem::url() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->downloadUrl;
}
@@ -252,9 +252,9 @@ QUrl QWebEngineDownloadItem::url()
and file name is deduced not to overwrite already existing files.
*/
-QString QWebEngineDownloadItem::path()
+QString QWebEngineDownloadItem::path() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->downloadPath;
}
@@ -282,9 +282,9 @@ void QWebEngineDownloadItem::setPath(QString path)
\sa finished(), state(),
*/
-bool QWebEngineDownloadItem::isFinished()
+bool QWebEngineDownloadItem::isFinished() const
{
- Q_D(QWebEngineDownloadItem);
+ Q_D(const QWebEngineDownloadItem);
return d->downloadFinished;
}