diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-30 13:50:07 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-06-30 13:50:07 +0000 |
commit | c0d5f7e6c10e56777b025b83a1fc53c610927714 (patch) | |
tree | 214c8e6892a039997dacbbce33e3814e34bbd301 /examples | |
parent | b6690b2334a6004ba7281cdfb34046e98e475502 (diff) | |
parent | cba8f2605f34649e3ca2a767edc7ac9509e7fee9 (diff) |
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
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)) { |