Skip to content

sensors: Correctly handle the return value of QCollator::compare

QCollator::compare() can return any integer, not just [-1, 0, 1]. Comparing the result with -1 happened to work with most locales, but it broke with the C locale. As a result, when sensors were put into std::map, they were sometimes erroneously treated as duplicates, leading to a randomly incomplete and garbled sensor list.

BUG: 461070

Merge request reports