summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-03-10 15:32:04 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-03-10 21:55:17 +0100
commita25644aecf056b9b021189de5384519b6f06c1e6 (patch)
treee84139c3ca9bacb2ca00c672cf7ffd8a8a44753b /tests/auto/network
parentf030037d24ed08b3632264b0c6791b311d4b8603 (diff)
QVariant: fix comparisons between strings and integer 0
250ca8d5f8bb3771695ae8eccb8d9b469003d840 changed the qConvertToNumber to have a std::optional return instead of a boolean out-argument. In doing so a code path that was supposed to report a failure (string could not be converted to an integer) accidentally starting reporting success (and converting the string to 0). The problem is that the `ok` check from QString::toLongLong was accidentally dropped in the refactoring; previously the function set `ok` to false and returned 0, now the function just returns 0. Instead, amend that return to return nullopt (because the conversion has failed). Change-Id: Iaedef5463f3ec500a97bd4c9bbddf977f66df61a Pick-to: 6.5 6.5.0 Fixes: QTBUG-111867 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/network')
0 files changed, 0 insertions, 0 deletions