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 ** 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: