fix position handling in geoclue2 plugin
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 17 Dec 2022 15:20:18 +0000 (15:20 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 17 Dec 2022 15:20:18 +0000 (15:20 +0000)
commitd4c21e5203ac61180f8ef25c18332d8d7a6aaccf
treee617cbe5dd146a73ec6f682bfed65fe59a24faf8
parenta179bdc1bc20ccac093484ef6fbca61577624777
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