diff options
author | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-06-11 14:06:13 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-06-12 09:26:58 +0000 |
commit | 0b65f3ca378810d3b33345b99bf084124acf3e5f (patch) | |
tree | 3f2857dfd9c98498d8be92607a11a2a4f023ab41 /src/webenginewidgets/api/qwebengineprofile.cpp | |
parent | e0e74a0a9286bb92ae7e2e2395827538133d2bf0 (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/qwebengineprofile.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index adccfca2a..2e5f685fd 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -103,8 +103,8 @@ using QtWebEngineCore::BrowserContextAdapter; */ QWebEngineProfilePrivate::QWebEngineProfilePrivate(BrowserContextAdapter* browserContext) - : scriptCollection(new QWebEngineScriptCollectionPrivate(browserContext->userScriptController())) - , m_settings(new QWebEngineSettings()) + : m_settings(new QWebEngineSettings()) + , m_scriptCollection(new QWebEngineScriptCollection(new QWebEngineScriptCollectionPrivate(browserContext->userScriptController()))) , m_browserContextRef(browserContext) { m_browserContextRef->addClient(this); @@ -438,10 +438,10 @@ bool QWebEngineProfile::visitedLinksContainsUrl(const QUrl &url) const Returns the script collection used by this profile. \sa QWebEngineScriptCollection */ -QWebEngineScriptCollection &QWebEngineProfile::scripts() +QWebEngineScriptCollection *QWebEngineProfile::scripts() const { - Q_D(QWebEngineProfile); - return d->scriptCollection; + Q_D(const QWebEngineProfile); + return d->m_scriptCollection.data(); } /*! |