From 7fe11b800a5da1848b7c9301858e8b9298d6c678 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 28 Aug 2018 23:35:38 +0100 Subject: [PATCH] Launcher: use a more robust resource path Some version of Qt seem to dislike the qrc:/// format, so use the single-slash format here. --- src/GUI/LauncherController.cxx | 2 +- src/GUI/qml/OverlayShared.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GUI/LauncherController.cxx b/src/GUI/LauncherController.cxx index 5a4854bba..1494e4f3c 100644 --- a/src/GUI/LauncherController.cxx +++ b/src/GUI/LauncherController.cxx @@ -164,7 +164,7 @@ void LauncherController::initQML() qmlRegisterType("FlightGear", 1, 0, "RouteDiagram"); qmlRegisterType("FlightGear", 1, 0, "RadioButtonGroup"); - qmlRegisterSingletonType(QUrl("qrc:///qml/OverlayShared.qml"), "FlightGear", 1, 0, "OverlayShared"); + qmlRegisterSingletonType(QUrl("qrc:/qml/OverlayShared.qml"), "FlightGear", 1, 0, "OverlayShared"); QNetworkDiskCache* diskCache = new QNetworkDiskCache(this); SGPath cachePath = globals->get_fg_home() / "PreviewsCache"; diff --git a/src/GUI/qml/OverlayShared.qml b/src/GUI/qml/OverlayShared.qml index afaa2d4bc..a9b7c8094 100644 --- a/src/GUI/qml/OverlayShared.qml +++ b/src/GUI/qml/OverlayShared.qml @@ -1,6 +1,6 @@ pragma Singleton -import QtQuick 2.0 +import QtQml 2.0 QtObject { - property var globalOverlay + property var globalOverlay: nil }