summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 708fdaa74..55a9cc4a6 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -221,8 +221,13 @@ bool usingSoftwareDynamicGL()
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()) {
- QFile file(pac_url.toLocalFile());
+ if (pac_url.isValid() && (pac_url.isLocalFile() ||
+ !pac_url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive))) {
+ QFile file;
+ if (pac_url.isLocalFile())
+ file.setFileName(pac_url.toLocalFile());
+ else
+ file.setFileName(pac_url.path().prepend(QChar(':')));
if (file.exists() && file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QByteArray ba = file.readAll();
commandLine->RemoveSwitch(switches::kProxyPacUrl);