diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-10-16 15:17:56 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-10-25 19:58:29 +0000 |
commit | e04775548b3cd69dc3e8f32930025fb1f1f4b002 (patch) | |
tree | 84da5eac8e1f42dd000d202b526b5917421a85b5 | |
parent | f4d34edd8cc7e98083414fd58a9c36364302f7c3 (diff) |
Fix QIviSimulationEngine loadSimulation to use QUrl instead of QString
Change-Id: I8f9caa83814519934fd244ae75817ae940e059a7
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | examples/ivicore/qface-ivi-addressbook/example-ivi-addressbook.yaml | 2 | ||||
-rw-r--r-- | src/ivicore/qivisimulationengine.cpp | 5 | ||||
-rw-r--r-- | src/ivicore/qivisimulationengine.h | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/examples/ivicore/qface-ivi-addressbook/example-ivi-addressbook.yaml b/examples/ivicore/qface-ivi-addressbook/example-ivi-addressbook.yaml index 20304e3..cf21d7d 100644 --- a/examples/ivicore/qface-ivi-addressbook/example-ivi-addressbook.yaml +++ b/examples/ivicore/qface-ivi-addressbook/example-ivi-addressbook.yaml @@ -1,6 +1,6 @@ Example.IVI.AddressBook: config_simulator: - simulationFile: ":/plugin_resource/simulation.qml" + simulationFile: "qrc:/plugin_resource/simulation.qml" Example.IVI.AddressBook.AddressBook#contacts: config_simulator: diff --git a/src/ivicore/qivisimulationengine.cpp b/src/ivicore/qivisimulationengine.cpp index dd3ff90..fa10d3b 100644 --- a/src/ivicore/qivisimulationengine.cpp +++ b/src/ivicore/qivisimulationengine.cpp @@ -225,10 +225,9 @@ QIviSimulationEngine::QIviSimulationEngine(QObject *parent) In addition to QQmlApplicationEngine::load(), this function provides functionality to change the used simulation file by using an environment variable. */ -void QIviSimulationEngine::loadSimulation(const QString &file) +void QIviSimulationEngine::loadSimulation(const QUrl &file) { - if (QFile::exists(file)) - load(file); + load(file); } /*! diff --git a/src/ivicore/qivisimulationengine.h b/src/ivicore/qivisimulationengine.h index 988fd9a..9e23a4b 100644 --- a/src/ivicore/qivisimulationengine.h +++ b/src/ivicore/qivisimulationengine.h @@ -63,7 +63,7 @@ public: qmlRegisterType< qtivi_private::QIviSimulationProxy<T> >(uri, versionMajor, versionMinor, qmlName); } - void loadSimulation(const QString &file); + void loadSimulation(const QUrl &file); }; QT_END_NAMESPACE |