From d61623deb70b510663d7c8d74733ab948156dd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 26 Jun 2014 14:39:52 +0200 Subject: Fix crash when loading context menu on Windows. Use QUrl::fromLocalFile to load components from the installation Qml directory. Using just the absolute file path wasn't a problem on Linux, but did not work on Windows. Other Qt modules are also using QUrl::fromLocalFile to do this. Change-Id: I689c516dc63a6c966435eedb94441d7c9246dd25 Reviewed-by: Andras Becsi --- src/webengine/ui_delegates_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine') diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 969a46758..104b2c333 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -164,7 +164,7 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type) if (!fi.exists()) return false; // FIXME: handle async loading - *component = (new QQmlComponent(engine, QUrl(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view)); + *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view)); if ((*component)->status() != QQmlComponent::Ready) { #ifdef UI_DELEGATES_DEBUG -- cgit v1.2.3