summaryrefslogtreecommitdiff
path: root/examples/webenginewidgets/browser/browserapplication.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 /examples/webenginewidgets/browser/browserapplication.cpp
parente0e74a0a9286bb92ae7e2e2395827538133d2bf0 (diff)
downloadqtwebengine-0b65f3ca378810d3b33345b99bf084124acf3e5f.tar.gz
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 'examples/webenginewidgets/browser/browserapplication.cpp')
-rw-r--r--examples/webenginewidgets/browser/browserapplication.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/webenginewidgets/browser/browserapplication.cpp b/examples/webenginewidgets/browser/browserapplication.cpp
index 8961bf7fb..ca28b2d0b 100644
--- a/examples/webenginewidgets/browser/browserapplication.cpp
+++ b/examples/webenginewidgets/browser/browserapplication.cpp
@@ -83,11 +83,11 @@ static void setUserStyleSheet(QWebEngineProfile *profile, const QString &styleSh
Q_ASSERT(profile);
QString scriptName(QStringLiteral("userStyleSheet"));
QWebEngineScript script;
- QList<QWebEngineScript> styleSheets = profile->scripts().findScripts(scriptName);
+ QList<QWebEngineScript> styleSheets = profile->scripts()->findScripts(scriptName);
if (!styleSheets.isEmpty())
script = styleSheets.first();
Q_FOREACH (const QWebEngineScript &s, styleSheets)
- profile->scripts().remove(s);
+ profile->scripts()->remove(s);
if (script.isNull()) {
script.setName(scriptName);
@@ -106,7 +106,7 @@ static void setUserStyleSheet(QWebEngineProfile *profile, const QString &styleSh
"css.innerText = \"%1\";"\
"})()").arg(styleSheet);
script.setSourceCode(source);
- profile->scripts().insert(script);
+ profile->scripts()->insert(script);
// run the script on the already loaded views
// this has to be deferred as it could mess with the storage initialization on startup
if (mainWindow)