diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-29 20:20:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-29 20:20:58 +0200 |
commit | cba8f2605f34649e3ca2a767edc7ac9509e7fee9 (patch) | |
tree | c3fbf81bc0eee5db87c357366b22ffd62b9c3dcc /examples | |
parent | 0c366eb741d8d925418c517d3954900c090aca3d (diff) | |
parent | 434ef539381bbc3c19f54f914d5bda83eafdc92b (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
.qmake.conf
src/webenginewidgets/api/qwebenginepage.cpp
Change-Id: Idb33c92bd53fab76eee8fedb542dbf5e4a10f9e6
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webenginewidgets/browser/browserapplication.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/examples/webenginewidgets/browser/browserapplication.cpp b/examples/webenginewidgets/browser/browserapplication.cpp index 3bc801295..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) @@ -122,14 +122,8 @@ BrowserApplication::BrowserApplication(int &argc, char **argv) QCoreApplication::setOrganizationName(QLatin1String("Qt")); QCoreApplication::setApplicationName(QLatin1String("demobrowser")); QCoreApplication::setApplicationVersion(QLatin1String("0.1")); -#ifdef Q_WS_QWS - // Use a different server name for QWS so we can run an X11 - // browser and a QWS browser in parallel on the same machine for - // debugging - QString serverName = QCoreApplication::applicationName() + QLatin1String("_qws"); -#else - QString serverName = QCoreApplication::applicationName(); -#endif + QString serverName = QCoreApplication::applicationName() + + QString::fromLatin1(QT_VERSION_STR).remove('.') + QLatin1String("webengine"); QLocalSocket socket; socket.connectToServer(serverName); if (socket.waitForConnected(500)) { |