Commit b17a8c67 authored by Don Gagne's avatar Don Gagne

Fix url formation

parent 0e63bc31
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "QGCFileDialog.h" #include "QGCFileDialog.h"
#include <QSettings> #include <QSettings>
#include <Qurl>
const char* CustomCommandWidgetController::_settingsKey = "CustomCommand.QmlFile"; const char* CustomCommandWidgetController::_settingsKey = "CustomCommand.QmlFile";
...@@ -64,7 +65,8 @@ void CustomCommandWidgetController::selectQmlFile(void) ...@@ -64,7 +65,8 @@ void CustomCommandWidgetController::selectQmlFile(void)
_customQmlFile.clear(); _customQmlFile.clear();
settings.remove(_settingsKey); settings.remove(_settingsKey);
} else { } else {
_customQmlFile = QString("file:%1").arg(qmlFile); QUrl url = QUrl::fromLocalFile(qmlFile);
_customQmlFile = url.toString();
settings.setValue(_settingsKey, _customQmlFile); settings.setValue(_settingsKey, _customQmlFile);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment