diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-25 18:38:07 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-27 13:26:53 +0100 |
commit | bb53b35b5419a4fa4b0c681c82ff1dfcc2761be7 (patch) | |
tree | c9df76334f2afd49eb3c34361e32e9834741a8e6 /src | |
parent | e1def46f3707f9307d16f5bb2eae9db633b1c961 (diff) |
Make QCollatorSortKey's operator<() a hidden friend
Documentation change to follow, as part of a QCollator doc overhaul.
Change-Id: Ie8d3df15a6c0f86b611a8866adf12f3355cc9710
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/text/qcollator.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/text/qcollator.h b/src/corelib/text/qcollator.h index 793d1cedd4..eebd675ec1 100644 --- a/src/corelib/text/qcollator.h +++ b/src/corelib/text/qcollator.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2013 Aleix Pol Gonzalez <aleixpol@kde.org> ** Contact: https://www.qt.io/licensing/ ** @@ -62,6 +62,8 @@ public: { d.swap(other.d); } int compare(const QCollatorSortKey &key) const; + friend bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) + { return lhs.compare(rhs) < 0; } protected: QCollatorSortKey(QCollatorSortKeyPrivate*); @@ -72,11 +74,6 @@ private: QCollatorSortKey(); }; -inline bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) -{ - return lhs.compare(rhs) < 0; -} - class Q_CORE_EXPORT QCollator { public: |