summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-05-22 15:57:45 +0200
committerLars Knoll <lars.knoll@qt.io>2019-10-30 11:52:43 +0100
commit1299a2330ae14a6a901f574ea01fc63715e1b87d (patch)
tree346c04881a5af47df7353201e20f2ffd65edcd77 /src/corelib/tools/qlist.h
parent5df1cf38e3d400fe1fb175c913f759b7fa9b68a4 (diff)
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<QString> is now slightly source incompatible as QStringList is a QVector, but that will be fixed in a follow-up change when QList<QString> will start mapping to a QVector. Change-Id: I7cfb8a72d4d95b347bbd386892f244b7203b41c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r--src/corelib/tools/qlist.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index ffd470efcd..5dde80417d 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -71,14 +71,6 @@ QT_BEGIN_NAMESPACE
template <typename T> class QVector;
template <typename T> class QSet;
-template <typename T> struct QListSpecialMethods
-{
-protected:
- ~QListSpecialMethods() = default;
-};
-template <> struct QListSpecialMethods<QByteArray>;
-template <> struct QListSpecialMethods<QString>;
-
struct Q_CORE_EXPORT QListData {
// tags for tag-dispatching of QList implementations,
// based on QList's three different memory layouts:
@@ -126,9 +118,6 @@ namespace QtPrivate {
template <typename T>
class QList
-#ifndef Q_QDOC
- : public QListSpecialMethods<T>
-#endif
{
public:
struct MemoryLayout
@@ -848,7 +837,7 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper()
template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T>::QList(const QList<T> &l)
- : QListSpecialMethods<T>(l), d(l.d)
+ : d(l.d)
{
if (!d->ref.ref()) {
p.detach(d->alloc);