summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/psql/qsql_psql.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2025-01-28 02:33:43 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2025-01-29 06:36:48 +0100
commit83c812e1322a2b004bc604be3e6f61fb83246eb0 (patch)
tree99d18b1b753d0c35dd182a45bbf7dd7c57c07e2e /src/plugins/sqldrivers/psql/qsql_psql.cpp
parent57aabff91eed41fb7ba0cf67df4fe7767c6e0e43 (diff)
QNumeric: add a private qUnsignedAbs
Checking qAbs preconditions reveals that several places into Qt are calling it with minimal values, causing UB. Those places do not actually need that the absolute value is of the same type as the parameter. Therefore, introduce qUnsignedAbs, which is like qAbs() but whose return type is always unsigned, and therefore can accept everything. This function is private; I don't want to encourage users to rely on our extension. Aggressively cherry picking because this will be needed in subsequent bugfixes. Change-Id: I2047768a5fd35f12bf898ca8c2008813434edd8d Pick-to: 6.9 6.8 6.5 6.2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/sqldrivers/psql/qsql_psql.cpp')
0 files changed, 0 insertions, 0 deletions