diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-06-25 11:05:52 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2019-06-25 11:05:52 +0200 |
commit | 960659f850a6643e6694898582f69c9e521a3f60 (patch) | |
tree | 46c6aa86efb4a2bbe30f202b94149b9669282b29 | |
parent | d935a744982d634c0538661eb48da88aec142ee7 (diff) | |
download | qtivi-960659f850a6643e6694898582f69c9e521a3f60.tar.gz |
Use simulation backends for our QtIvi examples
Because we introduced a production backend based on QtRO, this backend
is used by default, but as no server is running it can't connect it
and shows some errors.
To not over complicate things we now use the simulation backend for
those examples and add a small note to the example documentation
Change-Id: I706d449e7e84f70a560aaa4f95baa86bb2682448
Fixes: AUTOSUITE-1057
Reviewed-by: Vladimir Minenko <vladimir.minenko@pelagicore.com>
Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
6 files changed, 8 insertions, 2 deletions
diff --git a/examples/ivimedia/mediaplayer/main.qml b/examples/ivimedia/mediaplayer/main.qml index 91ccc3e..c78b236 100644 --- a/examples/ivimedia/mediaplayer/main.qml +++ b/examples/ivimedia/mediaplayer/main.qml @@ -65,6 +65,7 @@ ApplicationWindow { MediaPlayer { id: mediaPlayer + discoveryMode: MediaPlayer.LoadOnlySimulationBackends } SplitView { diff --git a/examples/ivivehiclefunctions/climate_qml/main.qml b/examples/ivivehiclefunctions/climate_qml/main.qml index 75d36ed..1aba4c9 100644 --- a/examples/ivivehiclefunctions/climate_qml/main.qml +++ b/examples/ivivehiclefunctions/climate_qml/main.qml @@ -68,7 +68,7 @@ ApplicationWindow { //![1] ClimateControl { id: climateControl - discoveryMode: ClimateControl.AutoDiscovery + discoveryMode: ClimateControl.LoadOnlySimulationBackends } //![1] diff --git a/examples/ivivehiclefunctions/climate_widget/mainwindow.cpp b/examples/ivivehiclefunctions/climate_widget/mainwindow.cpp index ab8504a..a6d1503 100644 --- a/examples/ivivehiclefunctions/climate_widget/mainwindow.cpp +++ b/examples/ivivehiclefunctions/climate_widget/mainwindow.cpp @@ -73,6 +73,7 @@ MainWindow::MainWindow(QWidget *parent) : //![1] m_climateControl = new QIviClimateControl(QString(), this); + m_climateControl->setDiscoveryMode(QIviAbstractFeature::LoadOnlySimulationBackends); m_climateControl->startAutoDiscovery(); if (!m_climateControl->isValid()) diff --git a/examples/ivivehiclefunctions/window_qml/main.qml b/examples/ivivehiclefunctions/window_qml/main.qml index 5679044..c9fb2a1 100644 --- a/examples/ivivehiclefunctions/window_qml/main.qml +++ b/examples/ivivehiclefunctions/window_qml/main.qml @@ -65,7 +65,7 @@ ApplicationWindow { WindowControl { id: windowControl - discoveryMode: WindowControl.AutoDiscovery + discoveryMode: WindowControl.LoadOnlySimulationBackends } ColumnLayout { diff --git a/src/ivivehiclefunctions/doc/src/examples-climate_qml.qdoc b/src/ivivehiclefunctions/doc/src/examples-climate_qml.qdoc index 0c202b0..21874f7 100644 --- a/src/ivivehiclefunctions/doc/src/examples-climate_qml.qdoc +++ b/src/ivivehiclefunctions/doc/src/examples-climate_qml.qdoc @@ -66,6 +66,8 @@ of a plugin that implements QIviClimateControlBackendInterface. \snippet ivivehiclefunctions/climate_qml/main.qml 1 + \note To simplify the deployment process, this example loads a simulation backend. + If discovery fails, a message dialog is shown: \snippet ivivehiclefunctions/climate_qml/main.qml 4 diff --git a/src/ivivehiclefunctions/doc/src/examples-climate_widget.qdoc b/src/ivivehiclefunctions/doc/src/examples-climate_widget.qdoc index 34caf76..9b1e1c1 100644 --- a/src/ivivehiclefunctions/doc/src/examples-climate_widget.qdoc +++ b/src/ivivehiclefunctions/doc/src/examples-climate_widget.qdoc @@ -67,6 +67,8 @@ to start searching for a suitable backend right away and pick the first one that matches. + \note To simplify the deployment process, this example loads a simulation backend. + \l {QIviClimateControl::}{isValid()} is used for verifying that the autoDiscovery found a backend: \snippet ivivehiclefunctions/climate_widget/mainwindow.cpp 1 |