diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-05-03 22:07:24 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-05-04 11:52:38 +0000 |
commit | 5e89c1406e12b59b5818bd497c9aba4673e05577 (patch) | |
tree | 3a0853ef4089c346e483e213527d28d8fde897a8 /src/corelib/global | |
parent | 1e0be201c3a48e9cc6fe503b2f1a695bd3846072 (diff) |
Delete less-than operator for QKeyCombination
QMetaType relies on QTypeTraits to identify whether a type provides
operator<. Due to the the deprecated implicit conversion to int, this
results in several screens of deprecation warnings when using
QKeyCombination in a signal parameter or as a property type.
QKeyCombination has no ordering semantics (is Alt+F5 larger than
Control+Up?), so delete the operator.
[ChangeLog][QtCore][QKeyCombination] Potentially source-incompatible change:
the less-than operator for QKeyCombination has been deleted. Code relying
on the deprecated implicit conversion to int will no longer compile.
Use QKeyCombination::toCombined explicitly.
Change-Id: Ic8522b88d68063f74b5a5582c51aee8e18982331
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qnamespace.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 0f5003e593..f678c81c6b 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1919,6 +1919,8 @@ public: { return lhs.combination != rhs.combination; } + + bool operator<(QKeyCombination) const = delete; }; Q_DECLARE_TYPEINFO(QKeyCombination, Q_RELOCATABLE_TYPE); |