summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qundostack.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-10-14 09:52:01 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-10-15 16:51:11 +0200
commit9b4c15ef5ffa94829a0c690eba37472c6833600c (patch)
tree01d71122007380193c776bc002152b7fb0e68b58 /src/gui/util/qundostack.cpp
parent104ad65a173e27a54650ef0c165f82e2fdcb2301 (diff)
QUndoStack: use idiomatic relational operators
Don't only define the inequality operator. Not even C++20 will synthesize equality from it. Instead, for C++20, default equality and, for non-C++20-builds, define inequality in terms of non-equality. Also =delete qHash(). Equality-comparable types ought to be hashable, but the code currently doesn't need this feature, so document this by deleting the qHash overload explicitly. This also prevents 3rd-parties from defining their own qHash(ActionState), an issue of which we have had several instances in Qt already, and which can lead to ODR violations. Amends 31b0dadb0f371fc94652782c28024f135a0b6f4b. Pick-to: 6.10 6.8 Task-number: QTBUG-138567 Change-Id: Ib766d44697cb763147eafceb5ffd947206bda979 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/gui/util/qundostack.cpp')
0 files changed, 0 insertions, 0 deletions