summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/web_engine_context.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 37ff0c61c..25655bc71 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -205,6 +205,7 @@ sandbox::SandboxInterfaceInfo *staticSandboxInterfaceInfo(sandbox::SandboxInterf
extern std::unique_ptr<base::MessagePump> messagePumpFactory();
+// used from gl_surface_qt.cpp
bool usingSoftwareDynamicGL()
{
if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL))
@@ -220,21 +221,22 @@ bool usingSoftwareDynamicGL()
#endif
}
-void setupProxyPac(base::CommandLine *commandLine){
+static void setupProxyPac(base::CommandLine *commandLine)
+{
if (commandLine->HasSwitch(switches::kProxyPacUrl)) {
QUrl pac_url(toQt(commandLine->GetSwitchValueASCII(switches::kProxyPacUrl)));
if (pac_url.isValid() && (pac_url.isLocalFile() ||
- !pac_url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive))) {
+ !pac_url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive))) {
QFile file;
if (pac_url.isLocalFile())
- file.setFileName(pac_url.toLocalFile());
+ file.setFileName(pac_url.toLocalFile());
else
- file.setFileName(pac_url.path().prepend(QChar(':')));
+ file.setFileName(pac_url.path().prepend(QChar(':')));
if (file.exists() && file.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QByteArray ba = file.readAll();
- commandLine->RemoveSwitch(switches::kProxyPacUrl);
- commandLine->AppendSwitchASCII(switches::kProxyPacUrl,
- ba.toBase64().prepend("data:application/x-javascript-config;base64,").toStdString());
+ QByteArray ba = file.readAll();
+ commandLine->RemoveSwitch(switches::kProxyPacUrl);
+ commandLine->AppendSwitchASCII(switches::kProxyPacUrl,
+ ba.toBase64().prepend("data:application/x-javascript-config;base64,").toStdString());
}
}
}