summaryrefslogtreecommitdiffstats
path: root/src/core/profile_adapter.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-10-29 13:03:18 +0100
committerJüri Valdmann <juri.valdmann@qt.io>2018-10-31 23:24:55 +0000
commitbc1529f56b8c86259c7f952b0ea9b439f5cc8d53 (patch)
tree0bb3a0d05c5a286700002aa23de619815357269e /src/core/profile_adapter.cpp
parent0c7376edee43718fa868f9fdbe0a9419ba4a636a (diff)
Use QWebEngineUrlSchemeHandler for qrc
Delete qrc protocol handler and use custom scheme protocol handler instead. Fixes: QTBUG-71215 Change-Id: I8aa390552c80b591a92f52b8a388e5a707d28f9e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/profile_adapter.cpp')
-rw-r--r--src/core/profile_adapter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp
index f2b1d6998..437423a4a 100644
--- a/src/core/profile_adapter.cpp
+++ b/src/core/profile_adapter.cpp
@@ -90,6 +90,7 @@ ProfileAdapter::ProfileAdapter(const QString &storageName):
content::BrowserContext::Initialize(m_profile.data(), toFilePath(dataPath()));
// fixme: this should not be here
m_profile->m_profileIOData->initializeOnUIThread();
+ m_customUrlSchemeHandlers.insert(QByteArrayLiteral("qrc"), &m_qrcHandler);
}
ProfileAdapter::~ProfileAdapter()
@@ -495,6 +496,7 @@ void ProfileAdapter::installUrlSchemeHandler(const QByteArray &scheme, QWebEngin
void ProfileAdapter::removeAllUrlSchemeHandlers()
{
m_customUrlSchemeHandlers.clear();
+ m_customUrlSchemeHandlers.insert(QByteArrayLiteral("qrc"), &m_qrcHandler);
updateCustomUrlSchemeHandlers();
}