diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-10-08 14:58:56 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-08-12 11:58:55 +0200 |
commit | 49400214e0562e519f918bd88496eda91816c0e0 (patch) | |
tree | be1cd86b73c3a845ede1325fc9d008b7fc0680af /src/corelib/tools/qset.h | |
parent | ae83398d82173e7d416e72952760180414ea3fb6 (diff) |
Get rid of the deprecated QSet::to/fromList methods
This is the first step towards removing/deprecating QList in Qt 6.
Change-Id: I043151d25a1dc17fc748fb1b4686c4b6c9c5e90b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/tools/qset.h')
-rw-r--r-- | src/corelib/tools/qset.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h index 19d6982133..f6db47ed59 100644 --- a/src/corelib/tools/qset.h +++ b/src/corelib/tools/qset.h @@ -246,12 +246,6 @@ public: { QSet<T> result = *this; result -= other; return result; } QList<T> values() const; -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - Q_DECL_DEPRECATED_X("Use values() instead.") - QList<T> toList() const { return values(); } - Q_DECL_DEPRECATED_X("Use QSet<T>(list.begin(), list.end()) instead.") - static QSet<T> fromList(const QList<T> &list); -#endif private: Hash q_hash; @@ -376,30 +370,6 @@ Q_OUTOFLINE_TEMPLATE QList<T> QSet<T>::values() const return result; } -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) -template <typename T> -Q_OUTOFLINE_TEMPLATE QSet<T> QList<T>::toSet() const -{ - QSet<T> result; - result.reserve(size()); - for (int i = 0; i < size(); ++i) - result.insert(at(i)); - return result; -} - -template <typename T> -QSet<T> QSet<T>::fromList(const QList<T> &list) -{ - return list.toSet(); -} - -template <typename T> -QList<T> QList<T>::fromSet(const QSet<T> &set) -{ - return set.toList(); -} -#endif - Q_DECLARE_SEQUENTIAL_ITERATOR(Set) #if !defined(QT_NO_JAVA_STYLE_ITERATORS) |