fix position handling in geoclue2 plugin
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 29 Sep 2022 08:55:48 +0000 (09:55 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 29 Sep 2022 08:55:48 +0000 (09:55 +0100)
commitc19db1a0883ab0ded3a1dd2ae80460dbc9112636
tree72a78d9a8e35cebd567c9f0cbef702b37ae393a8
parent33d8a73d50bed8e975ad38d4bfb4a886c99b8130
fix position handling in geoclue2 plugin

Origin: upstream, https://code.qt.io/cgit/qt/qtpositioning.git/commit/?id=70b7818e1fc585f8
Last-Update: 2021-11-10

The pre-existing code was incorrect due to the operation priority.
The result of the comparison was assigned to the variables, so they
were always initialized with 0 or 1 instead of real values.

Also use std::numeric_limits<double>::lowest(), because the altitude
can have a negative value (when we are below sea level).

Gbp-Pq: Name geoclue2_fix_position_handling.diff
src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp