diff options
author | Bernhard Rosenkraenzer <bero@lindev.ch> | 2020-02-12 16:29:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-12 01:18:25 +0000 |
commit | 309c3d5967b0de3fef27a68434aeba2c78f8fe8f (patch) | |
tree | 39bd576c3e34da097937defb7e030422af8a1ca1 /src/widgets/dialogs | |
parent | ea91177144cd4a11632893818c06e27c305aa4fd (diff) |
QWizardLayoutInfo: make == and != operators const
This fixes building with clang 10.0 in C++20 mode.
http://eel.is/c++draft/diff.cpp17.over
Thanks to Ville Voutilainen <ville.voutilainen@qt.io>
for pointing out this better fix.
Task-number: QTBUG-81917
Change-Id: I8ce5776ddcd061b4615239e38caa5ad07950b66d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 234e0eadc83a4de6e48bce884542773fc1396e51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index ccc9c70d09..b11b075c00 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -256,11 +256,11 @@ public: bool extension = false; bool sideWidget = false; - bool operator==(const QWizardLayoutInfo &other); - inline bool operator!=(const QWizardLayoutInfo &other) { return !operator==(other); } + bool operator==(const QWizardLayoutInfo &other) const; + inline bool operator!=(const QWizardLayoutInfo &other) const { return !operator==(other); } }; -bool QWizardLayoutInfo::operator==(const QWizardLayoutInfo &other) +bool QWizardLayoutInfo::operator==(const QWizardLayoutInfo &other) const { return topLevelMarginLeft == other.topLevelMarginLeft && topLevelMarginRight == other.topLevelMarginRight |