Esri / arcgis-maps-sdk-toolkit-qt

ArcGIS Maps SDK for Qt Toolkit
Apache License 2.0
132 stars 61 forks source link

Time slider warning fix #569

Closed tanneryould closed 2 years ago

tanneryould commented 2 years ago

Checks to see if controller.timeForStep(n) returns a non null value before setting the start and end labels.

By doing this we avoid the following logged warnings when switching to the sample in the Mac QML sample viewer:

"Could not convert argument 0 at"
     "expression for text@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253"
     "showSample@qrc:/qml/main.qml:332"
     "onCurrentSampleChanged@qrc:/qml/main.qml:301"
     "expression for onClicked@qrc:/qml/SampleListView.qml:105"
"Could not convert argument 0 at"
     "expression for text@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253"
     "showSample@qrc:/qml/main.qml:332"
     "onCurrentSampleChanged@qrc:/qml/main.qml:301"
     "expression for onClicked@qrc:/qml/SampleListView.qml:105"
"Could not convert argument 0 at"
     "expression for text@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253"
     "showSample@qrc:/qml/main.qml:332"
     "onCurrentSampleChanged@qrc:/qml/main.qml:301"
     "expression for onClicked@qrc:/qml/SampleListView.qml:105"
"Could not convert argument 0 at"
     "onExtentsChanged@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:190"
     "initializeTimeProperties@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/Controller/TimeSliderController.qml:228"
     "onMapChanged@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/Controller/TimeSliderController.qml:174"
     "showSample@qrc:/qml/main.qml:332"
     "onCurrentSampleChanged@qrc:/qml/main.qml:301"
     "expression for onClicked@qrc:/qml/SampleListView.qml:105"
qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:190: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed.
qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed.
"Could not convert argument 0 at"
     "onExtentsChanged@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:190"
     "initializeTimeProperties@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/Controller/TimeSliderController.qml:228"
     "onLoadStatusChanged@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/Controller/TimeSliderController.qml:192"
qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:190: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed.
"Could not convert argument 0 at"
     "expression for text@qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253"
qrc:/esri.com/imports/Esri/ArcGISRuntime/Toolkit/TimeSlider.qml:253: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed.