summaryrefslogtreecommitdiffstats
path: root/src/corelib/text
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-03-07 16:24:00 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-03-12 21:51:43 +0100
commit285a2a75b4342e73d3165378d7af6c48d2f06492 (patch)
treed700a011c7ad6114300f57589488f02a1bf88987 /src/corelib/text
parent33159f5e0f18a6d9f4ca015bfb9a2a53089d1dfa (diff)
QVariant: use comparison helper macros
The relational operators were removed in 8652c79df0a47264a2d525424484e15744e2462b with the argument that they do not have a total order. Back than it was a valid argument, because Qt did not support any of the C++20 ordering types. Now Qt has its own implementation for all three ordering types, so we could technically add relational operators and claim that QVariant provides partial ordering. However, that could potentially lead to many bugs and/or unexpected results, if people start using QVariant as a key in std::map/QMap containers. We do not want that to happen, so we only use the helper macros to implement (in)equality operators. This commit also extends the unit tests, providing more extensive testing of (in)equality operators and the pre-existing QVariant::compare() method. Fixes: QTBUG-113234 Change-Id: I783f3b5df552da782627f4ed0a5bb1b577753a23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text')
0 files changed, 0 insertions, 0 deletions