From 5357231c0a10eef558cc6aebfd172048dc010a96 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 24 May 2019 14:27:48 +0200 Subject: Make QList an alias to QVector This is almost 100% source compatible with Qt 5. Exceptions are * Stability of references for large or non movable types * taking a PMF for types that are now overloaded with r-value references in QVector * The missing prepend optimization in QVector (that is still planned to come for Qt 6) Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0 Reviewed-by: Simon Hausmann --- .../auto/corelib/tools/collections/tst_collections.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'tests/auto/corelib/tools/collections') diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index a9adda2750..507b2e8d78 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -84,10 +84,6 @@ void foo() #include "qvector.h" #include "qqueue.h" -QT_BEGIN_NAMESPACE -template class QList; -QT_END_NAMESPACE - class tst_Collections : public QObject { Q_OBJECT @@ -551,19 +547,12 @@ void tst_Collections::list() list << "foo" << "bar"; QVERIFY(!list.isEmpty()); - list.insert(-1, "lessthanzero"); - QCOMPARE(list.at(0), QString("lessthanzero")); - list.insert(0, "atzero"); QCOMPARE(list.at(0), QString("atzero")); int listCount = list.count(); list.insert(listCount, "atcount"); QCOMPARE(list.at(listCount), QString("atcount")); - - listCount = list.count(); - list.insert(listCount + 1, "beyondcount"); - QCOMPARE(list.at(listCount), QString("beyondcount")); } { @@ -2336,12 +2325,6 @@ void populate(QLinkedList &container) container << 1 << 2 << 4 << 8; } -template <> -void populate(QVector &container) -{ - container << 1 << 2 << 4 << 8; -} - template <> void populate(QMap &container) { -- cgit v1.2.3