From 63dd1416ef90773d6302608c0a27f91bca7338ac Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Sat, 4 Jul 2020 13:52:44 +0200 Subject: Fix random indentation of setupProxyPac Change-Id: I05563a2a58eb77860bed065723a2e5274cf6efb6 Reviewed-by: Michal Klocek --- src/core/web_engine_context.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/core/web_engine_context.cpp') 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 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()); } } } -- cgit v1.2.3