fix position handling in geoclue2 plugin
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 13 Jun 2022 18:36:32 +0000 (19:36 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Mon, 13 Jun 2022 18:36:32 +0000 (19:36 +0100)
commit4e5c924646dd0930c566b6dc37e6b9a371a51cb0
treec909870fb8754aa02246ad309a57c7ab63784e88
parentb3ac4039c8ef809b8c2dd4301c3f936f211de953
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