lbcolorcorrect: Add a doneLocating property to geolocator
As seen on !3487 comments by @ratijas the doneLocating
property inside kcms/nightcolor/main.qml
file is messy. Currently it simply checks whether the location is (0, 0) and if it is it returns false. This is not a good way to define it and feels hacky. So I have created a doneLocating
property in geolocator which helps to check for changes. We can simply call locator.doneLocating
to check for whether the locator is done or not.
Current implementation in main.qml
:
readonly property bool doneLocating: locator !== undefined && !(locator.latitude == 0 && locator.longitude == 0)
Edited by Sanjay Swain