From ce8e6abe7fff563b11ab1e83e2bd83cbac5745f9 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 4 Sep 2012 21:10:05 +0200 Subject: Check for C++ operators that should be 'const' Make sure all C++ class comparison operators are const. Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d Reviewed-by: Thiago Macieira Reviewed-by: David Faure --- src/corelib/mimetypes/qmimemagicrulematcher.cpp | 2 +- src/corelib/mimetypes/qmimemagicrulematcher_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/mimetypes/qmimemagicrulematcher.cpp b/src/corelib/mimetypes/qmimemagicrulematcher.cpp index cdd73076fd..4a9cd2971e 100644 --- a/src/corelib/mimetypes/qmimemagicrulematcher.cpp +++ b/src/corelib/mimetypes/qmimemagicrulematcher.cpp @@ -67,7 +67,7 @@ QMimeMagicRuleMatcher::QMimeMagicRuleMatcher(const QString &mime, unsigned thePr { } -bool QMimeMagicRuleMatcher::operator==(const QMimeMagicRuleMatcher &other) +bool QMimeMagicRuleMatcher::operator==(const QMimeMagicRuleMatcher &other) const { return m_list == other.m_list && m_priority == other.m_priority; diff --git a/src/corelib/mimetypes/qmimemagicrulematcher_p.h b/src/corelib/mimetypes/qmimemagicrulematcher_p.h index b2bb287207..e4099da3cd 100644 --- a/src/corelib/mimetypes/qmimemagicrulematcher_p.h +++ b/src/corelib/mimetypes/qmimemagicrulematcher_p.h @@ -55,7 +55,7 @@ class QMimeMagicRuleMatcher public: explicit QMimeMagicRuleMatcher(const QString &mime, unsigned priority = 65535); - bool operator==(const QMimeMagicRuleMatcher &other); + bool operator==(const QMimeMagicRuleMatcher &other) const; void addRule(const QMimeMagicRule &rule); void addRules(const QList &rules); -- cgit v1.2.3