Change camera URL to non-optional QUrl

Otherwise pyqt property will complain when it tries to convert a None to
a QUrl.
This commit is contained in:
Lipu Fei 2018-10-29 13:23:10 +01:00
parent 0c1b3931db
commit 02681a5700
5 changed files with 23 additions and 30 deletions

View file

@ -31,8 +31,8 @@ Rectangle {
anchors.fill: parent;
hoverEnabled: true;
onClicked: {
if (OutputDevice.activeCameraUrl !== null) {
OutputDevice.setActiveCameraUrl(null)
if (OutputDevice.activeCameraUrl != "") {
OutputDevice.setActiveCameraUrl("");
} else {
OutputDevice.setActiveCameraUrl(modelData.cameraUrl);
}