From 2f857d20740eafe249befdea6e322d38dfa56fea Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 30 Apr 2015 10:19:47 -0700 Subject: [PATCH] Fix url formation --- src/ViewWidgets/CustomCommandWidgetController.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ViewWidgets/CustomCommandWidgetController.cc b/src/ViewWidgets/CustomCommandWidgetController.cc index e5ca99583..1cc7b1000 100644 --- a/src/ViewWidgets/CustomCommandWidgetController.cc +++ b/src/ViewWidgets/CustomCommandWidgetController.cc @@ -27,6 +27,7 @@ #include "QGCFileDialog.h" #include +#include const char* CustomCommandWidgetController::_settingsKey = "CustomCommand.QmlFile"; @@ -64,7 +65,8 @@ void CustomCommandWidgetController::selectQmlFile(void) _customQmlFile.clear(); settings.remove(_settingsKey); } else { - _customQmlFile = QString("file:%1").arg(qmlFile); + QUrl url = QUrl::fromLocalFile(qmlFile); + _customQmlFile = url.toString(); settings.setValue(_settingsKey, _customQmlFile); } -- 2.22.0