diff options
| author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2023-03-10 15:32:04 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-10 21:39:06 +0000 |
| commit | 7d86115a17705f1804b3b697fae15cafb733f797 (patch) | |
| tree | 71c12c47cd3b0caac483fff877d8b058b045463d /src/gui/opengl/qopenglprogrambinarycache.cpp | |
| parent | f4b1a9b8bdfc50166c0773ccfee0f6f2c0e4a16f (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
Fixes: QTBUG-111867
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit a25644aecf056b9b021189de5384519b6f06c1e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/opengl/qopenglprogrambinarycache.cpp')
0 files changed, 0 insertions, 0 deletions
