From 1299a2330ae14a6a901f574ea01fc63715e1b87d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 22 May 2019 15:57:45 +0200 Subject: Move QListSpecialMethods over to QVector Extend QVector with special methods for QByteArray and QString, just as QList had them in Qt 5. This also means that QStringList and QByteArrayList are now implemented through a QVector, not a QList anymore. QListIterator is now slightly source incompatible as QStringList is a QVector, but that will be fixed in a follow-up change when QList will start mapping to a QVector. Change-Id: I7cfb8a72d4d95b347bbd386892f244b7203b41c2 Reviewed-by: Simon Hausmann --- src/corelib/text/qbytearraylist.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/corelib/text/qbytearraylist.h') diff --git a/src/corelib/text/qbytearraylist.h b/src/corelib/text/qbytearraylist.h index 0250b649b8..4b6c926960 100644 --- a/src/corelib/text/qbytearraylist.h +++ b/src/corelib/text/qbytearraylist.h @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #ifndef QBYTEARRAYLIST_H #define QBYTEARRAYLIST_H @@ -49,12 +49,12 @@ QT_BEGIN_NAMESPACE #if !defined(QT_NO_JAVA_STYLE_ITERATORS) -typedef QListIterator QByteArrayListIterator; -typedef QMutableListIterator QMutableByteArrayListIterator; +typedef QVectorIterator QByteArrayListIterator; +typedef QMutableVectorIterator QMutableByteArrayListIterator; #endif #ifndef Q_CLANG_QDOC -typedef QList QByteArrayList; +typedef QVector QByteArrayList; namespace QtPrivate { QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *separator, int separatorLength); @@ -63,14 +63,14 @@ namespace QtPrivate { #endif #ifdef Q_CLANG_QDOC -class QByteArrayList : public QList +class QByteArrayList : public QVector #else -template <> struct QListSpecialMethods +template <> struct QVectorSpecialMethods #endif { #ifndef Q_CLANG_QDOC protected: - ~QListSpecialMethods() = default; + ~QVectorSpecialMethods() = default; #endif public: inline QByteArray join() const @@ -84,7 +84,7 @@ public: { return QtPrivate::QByteArrayList_indexOf(self(), needle, from); } private: - typedef QList Self; + typedef QVector Self; Self *self() { return static_cast(this); } const Self *self() const { return static_cast(this); } }; -- cgit v1.2.3