summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h2
-rw-r--r--src/corelib/animation/qvariantanimation.h8
-rw-r--r--src/corelib/animation/qvariantanimation_p.h1
-rw-r--r--src/corelib/global/qt_pch.h1
-rw-r--r--src/corelib/io/qdebug.h7
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h5
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h3
-rw-r--r--src/corelib/io/qfilesystemwatcher_win_p.h6
-rw-r--r--src/corelib/io/qiodevice_p.h8
-rw-r--r--src/corelib/io/qloggingregistry_p.h8
-rw-r--r--src/corelib/io/qsettings_p.h2
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h9
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel_p.h7
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.h3
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.h2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h5
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h8
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h4
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel_p.h6
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h1
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h4
-rw-r--r--src/corelib/kernel/qobject_p.h11
-rw-r--r--src/corelib/mimetypes/qmimedatabase_p.h2
-rw-r--r--src/corelib/plugin/qpluginloader.h4
-rw-r--r--src/corelib/serialization/qcbormap.h2
-rw-r--r--src/corelib/serialization/qcborvalue.h1
-rw-r--r--src/corelib/serialization/qcborvalue_p.h2
-rw-r--r--src/corelib/serialization/qdatastream.h4
-rw-r--r--src/corelib/serialization/qjson_p.h6
-rw-r--r--src/corelib/serialization/qxmlstream.h15
-rw-r--r--src/corelib/text/qcollator_p.h6
-rw-r--r--src/corelib/text/qstring.h24
-rw-r--r--src/corelib/text/qstringalgorithms.h2
-rw-r--r--src/corelib/text/qstringtokenizer.h8
-rw-r--r--src/corelib/text/qstringview.h2
-rw-r--r--src/corelib/thread/qfutureinterface.h8
-rw-r--r--src/corelib/thread/qresultstore.h22
-rw-r--r--src/corelib/thread/qthread_p.h12
-rw-r--r--src/corelib/thread/qthreadpool_p.h2
-rw-r--r--src/corelib/time/qdatetimeparser_p.h10
-rw-r--r--src/corelib/time/qtimezone.h2
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h12
-rw-r--r--src/corelib/tools/qcache.h6
-rw-r--r--src/corelib/tools/qeasingcurve.h4
-rw-r--r--src/corelib/tools/qflatmap_p.h10
-rw-r--r--src/corelib/tools/qhash.h44
-rw-r--r--src/corelib/tools/qringbuffer_p.h4
-rw-r--r--src/corelib/tools/qstack.h9
-rw-r--r--src/corelib/tools/qversionnumber.h30
49 files changed, 166 insertions, 198 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup_p.h b/src/corelib/animation/qsequentialanimationgroup_p.h
index c082d6b524..b788771fe5 100644
--- a/src/corelib/animation/qsequentialanimationgroup_p.h
+++ b/src/corelib/animation/qsequentialanimationgroup_p.h
@@ -92,7 +92,7 @@ public:
// this is the actual duration of uncontrolled animations
// it helps seeking and even going forward
- QVector<int> actualDuration;
+ QList<int> actualDuration;
void restart();
int lastLoop;
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index e47fa14b1c..f1721b8a65 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -40,11 +40,11 @@
#ifndef QVARIANTANIMATION_H
#define QVARIANTANIMATION_H
-#include <QtCore/qeasingcurve.h>
#include <QtCore/qabstractanimation.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qvariant.h>
+#include <QtCore/qeasingcurve.h>
+#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
+#include <QtCore/qvariant.h>
QT_REQUIRE_CONFIG(animation);
@@ -62,7 +62,7 @@ class Q_CORE_EXPORT QVariantAnimation : public QAbstractAnimation
public:
typedef QPair<qreal, QVariant> KeyValue;
- typedef QVector<KeyValue> KeyValues;
+ typedef QList<KeyValue> KeyValues;
QVariantAnimation(QObject *parent = nullptr);
~QVariantAnimation();
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index 57b59cf876..3425777ba5 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -54,7 +54,6 @@
#include "qvariantanimation.h"
#include <QtCore/qeasingcurve.h>
#include <QtCore/qmetaobject.h>
-#include <QtCore/qvector.h>
#include "private/qabstractanimation_p.h"
diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h
index 092fc7d40c..8e59ace85d 100644
--- a/src/corelib/global/qt_pch.h
+++ b/src/corelib/global/qt_pch.h
@@ -75,5 +75,4 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qtimer.h>
-#include <qvector.h>
#endif
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 9ee19f5fd4..46fd762874 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -47,7 +47,6 @@
#include <QtCore/qmap.h>
#include <QtCore/qtextstream.h>
#include <QtCore/qstring.h>
-#include <QtCore/qvector.h>
#include <QtCore/qset.h>
#include <QtCore/qcontiguouscache.h>
#include <QtCore/qsharedpointer.h>
@@ -262,10 +261,10 @@ inline QDebug printAssociativeContainer(QDebug debug, const char *which, const A
} // namespace QtPrivate
-template <typename T>
-inline QDebug operator<<(QDebug debug, const QVector<T> &vec)
+template<typename T>
+inline QDebug operator<<(QDebug debug, const QList<T> &vec)
{
- return QtPrivate::printSequentialContainer(debug, "QVector", vec);
+ return QtPrivate::printSequentialContainer(debug, "QList", vec);
}
template <typename T, typename Alloc>
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
index 6e8e7d4567..ad23805afb 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
@@ -53,11 +53,10 @@
#include "qfilesystemwatcher_p.h"
-#include <QtCore/qmutex.h>
#include <QtCore/qhash.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qvector.h>
+#include <QtCore/qmutex.h>
#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qthread.h>
#include <dispatch/dispatch.h>
#include <CoreServices/CoreServices.h>
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
index 8e11e4b7da..e0c7ff60f2 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h
+++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
@@ -55,9 +55,8 @@
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qvector.h>
#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qthread.h>
QT_REQUIRE_CONFIG(filesystemwatcher);
struct kevent;
diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h
index 138b6badf2..7808aff2ac 100644
--- a/src/corelib/io/qfilesystemwatcher_win_p.h
+++ b/src/corelib/io/qfilesystemwatcher_win_p.h
@@ -54,12 +54,12 @@
#include "qfilesystemwatcher_p.h"
#include <QtCore/qdatetime.h>
-#include <QtCore/qthread.h>
#include <QtCore/qfile.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qhash.h>
+#include <QtCore/qlist.h>
#include <QtCore/qmutex.h>
-#include <QtCore/qvector.h>
+#include <QtCore/qthread.h>
QT_BEGIN_NAMESPACE
@@ -157,7 +157,7 @@ public:
void wakeup();
QMutex mutex;
- QVector<Qt::HANDLE> handles;
+ QList<Qt::HANDLE> handles;
int msg;
HandleForDirHash handleForDir;
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 15a53a67dc..da46b983cd 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -51,12 +51,12 @@
// We mean it.
//
-#include "QtCore/qiodevice.h"
#include "QtCore/qbytearray.h"
+#include "QtCore/qiodevice.h"
+#include "QtCore/qlist.h"
#include "QtCore/qobjectdefs.h"
#include "QtCore/qstring.h"
#include "private/qringbuffer_p.h"
-#include "QtCore/qvector.h"
#ifndef QT_NO_QOBJECT
#include "private/qobject_p.h"
#endif
@@ -83,8 +83,8 @@ public:
QIODevice::OpenMode openMode;
QString errorString;
- QVector<QRingBuffer> readBuffers;
- QVector<QRingBuffer> writeBuffers;
+ QList<QRingBuffer> readBuffers;
+ QList<QRingBuffer> writeBuffers;
class QRingBufferRef {
QRingBuffer *m_buf;
diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h
index 3ac429b147..1a924f07dc 100644
--- a/src/corelib/io/qloggingregistry_p.h
+++ b/src/corelib/io/qloggingregistry_p.h
@@ -53,11 +53,11 @@
#include <QtCore/private/qglobal_p.h>
#include <QtCore/qloggingcategory.h>
+#include <QtCore/qlist.h>
#include <QtCore/qmap.h>
#include <QtCore/qmutex.h>
#include <QtCore/qstring.h>
#include <QtCore/qtextstream.h>
-#include <QtCore/qvector.h>
class tst_QLoggingRegistry;
@@ -98,14 +98,14 @@ public:
void setContent(const QString &content);
void setContent(QTextStream &stream);
- QVector<QLoggingRule> rules() const { return _rules; }
+ QList<QLoggingRule> rules() const { return _rules; }
private:
void parseNextLine(QStringView line);
private:
bool m_inRulesSection = false;
- QVector<QLoggingRule> _rules;
+ QList<QLoggingRule> _rules;
};
class Q_AUTOTEST_EXPORT QLoggingRegistry
@@ -143,7 +143,7 @@ private:
QMutex registryMutex;
// protected by mutex:
- QVector<QLoggingRule> ruleSets[NumRuleSets];
+ QList<QLoggingRule> ruleSets[NumRuleSets];
QHash<QLoggingCategory*,QtMsgType> categories;
QLoggingCategory::CategoryFilter categoryFilter;
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index 548fcb591d..bd8a40a324 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -293,7 +293,7 @@ private:
void ensureAllSectionsParsed(QConfFile *confFile) const;
void ensureSectionParsed(QConfFile *confFile, const QSettingsKey &key) const;
- QVector<QConfFile *> confFiles;
+ QList<QConfFile *> confFiles;
QSettings::ReadFunc readFunc;
QSettings::WriteFunc writeFunc;
QString extension;
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index ddebf835c8..d55e1f4b05 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -40,10 +40,10 @@
#ifndef QABSTRACTITEMMODEL_H
#define QABSTRACTITEMMODEL_H
-#include <QtCore/qvariant.h>
-#include <QtCore/qobject.h>
#include <QtCore/qhash.h>
-#include <QtCore/qvector.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qvariant.h>
QT_REQUIRE_CONFIG(itemmodel);
@@ -257,7 +257,8 @@ public:
Q_REQUIRED_RESULT bool checkIndex(const QModelIndex &index, CheckIndexOptions options = CheckIndexOption::NoOption) const;
Q_SIGNALS:
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
+ const QList<int> &roles = QList<int>());
void headerDataChanged(Qt::Orientation orientation, int first, int last);
void layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
void layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
index fca5f76200..6b2f69cf30 100644
--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
@@ -82,7 +82,8 @@ public:
~QAbstractItemModelPrivate();
void removePersistentIndexData(QPersistentModelIndexData *data);
- void movePersistentIndexes(const QVector<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent, Qt::Orientation orientation);
+ void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
+ Qt::Orientation orientation);
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
void rowsInserted(const QModelIndex &parent, int first, int last);
void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
@@ -142,8 +143,8 @@ public:
struct Persistent {
Persistent() {}
QMultiHash<QModelIndex, QPersistentModelIndexData *> indexes;
- QStack<QVector<QPersistentModelIndexData *> > moved;
- QStack<QVector<QPersistentModelIndexData *> > invalidated;
+ QStack<QList<QPersistentModelIndexData *>> moved;
+ QStack<QList<QPersistentModelIndexData *>> invalidated;
void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
} persistent;
diff --git a/src/corelib/itemmodels/qconcatenatetablesproxymodel.h b/src/corelib/itemmodels/qconcatenatetablesproxymodel.h
index 1fa84d5f51..a119bab098 100644
--- a/src/corelib/itemmodels/qconcatenatetablesproxymodel.h
+++ b/src/corelib/itemmodels/qconcatenatetablesproxymodel.h
@@ -91,7 +91,8 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsInserted(const QModelIndex &parent, int, int))
Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end))
Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsRemoved(const QModelIndex &parent, int, int))
- Q_PRIVATE_SLOT(d_func(), void _q_slotDataChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles))
+ Q_PRIVATE_SLOT(d_func(),
+ void _q_slotDataChanged(const QModelIndex &from, const QModelIndex &to, const QList<int> &roles))
Q_PRIVATE_SLOT(d_func(), void _q_slotSourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint))
Q_PRIVATE_SLOT(d_func(), void _q_slotSourceLayoutChanged(const QList<QPersistentModelIndex> &, QAbstractItemModel::LayoutChangeHint))
Q_PRIVATE_SLOT(d_func(), void _q_slotModelAboutToBeReset())
diff --git a/src/corelib/itemmodels/qidentityproxymodel.h b/src/corelib/itemmodels/qidentityproxymodel.h
index 4c14e6176a..ce2ac68f89 100644
--- a/src/corelib/itemmodels/qidentityproxymodel.h
+++ b/src/corelib/itemmodels/qidentityproxymodel.h
@@ -101,7 +101,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))
- Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>))
+ Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex, QModelIndex, QList<int>))
Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last))
Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint))
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index c1ce49521c..f735bf85a8 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -42,10 +42,9 @@
#include <QtCore/qglobal.h>
-#include <QtCore/qset.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qlist.h>
#include <QtCore/qabstractitemmodel.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qset.h>
QT_REQUIRE_CONFIG(itemmodel);
diff --git a/src/corelib/itemmodels/qitemselectionmodel_p.h b/src/corelib/itemmodels/qitemselectionmodel_p.h
index ba85f22be3..c520e50517 100644
--- a/src/corelib/itemmodels/qitemselectionmodel_p.h
+++ b/src/corelib/itemmodels/qitemselectionmodel_p.h
@@ -97,10 +97,10 @@ public:
QItemSelection currentSelection;
QPersistentModelIndex currentIndex;
QItemSelectionModel::SelectionFlags currentCommand;
- QVector<QPersistentModelIndex> savedPersistentIndexes;
- QVector<QPersistentModelIndex> savedPersistentCurrentIndexes;
- QVector<QPair<QPersistentModelIndex, uint> > savedPersistentRowLengths;
- QVector<QPair<QPersistentModelIndex, uint> > savedPersistentCurrentRowLengths;
+ QList<QPersistentModelIndex> savedPersistentIndexes;
+ QList<QPersistentModelIndex> savedPersistentCurrentIndexes;
+ QList<QPair<QPersistentModelIndex, uint>> savedPersistentRowLengths;
+ QList<QPair<QPersistentModelIndex, uint>> savedPersistentCurrentRowLengths;
// optimization when all indexes are selected
bool tableSelected;
QPersistentModelIndex tableParent;
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.h b/src/corelib/itemmodels/qsortfilterproxymodel.h
index 10853b2040..d2c5054351 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.h
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.h
@@ -194,7 +194,9 @@ private:
Q_DECLARE_PRIVATE(QSortFilterProxyModel)
Q_DISABLE_COPY(QSortFilterProxyModel)
- Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(const QModelIndex &source_top_left, const QModelIndex &source_bottom_right, const QVector<int> &roles))
+ Q_PRIVATE_SLOT(d_func(),
+ void _q_sourceDataChanged(const QModelIndex &source_top_left, const QModelIndex &source_bottom_right,
+ const QList<int> &roles))
Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int start, int end))
Q_PRIVATE_SLOT(d_func(), void _q_sourceAboutToBeReset())
Q_PRIVATE_SLOT(d_func(), void _q_sourceReset())
diff --git a/src/corelib/itemmodels/qtransposeproxymodel_p.h b/src/corelib/itemmodels/qtransposeproxymodel_p.h
index fb5ce5c117..8cee3d2288 100644
--- a/src/corelib/itemmodels/qtransposeproxymodel_p.h
+++ b/src/corelib/itemmodels/qtransposeproxymodel_p.h
@@ -62,14 +62,14 @@ class QTransposeProxyModelPrivate : public QAbstractProxyModelPrivate
Q_DISABLE_COPY(QTransposeProxyModelPrivate)
private:
QTransposeProxyModelPrivate() = default;
- QVector<QMetaObject::Connection> sourceConnections;
- QVector<QPersistentModelIndex> layoutChangePersistentIndexes;
+ QList<QMetaObject::Connection> sourceConnections;
+ QList<QPersistentModelIndex> layoutChangePersistentIndexes;
QModelIndexList layoutChangeProxyIndexes;
QModelIndex uncheckedMapToSource(const QModelIndex &proxyIndex) const;
QModelIndex uncheckedMapFromSource(const QModelIndex &sourceIndex) const;
void onLayoutChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
void onLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
- void onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles);
+ void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles);
void onHeaderDataChanged(Qt::Orientation orientation, int first, int last);
void onColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
void onColumnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h
index b9f1ef6317..849d72901d 100644
--- a/src/corelib/kernel/qcorecmdlineargs_p.h
+++ b/src/corelib/kernel/qcorecmdlineargs_p.h
@@ -60,7 +60,6 @@
# include <qt_windows.h> // first to suppress min, max macros.
# include <shlobj.h>
# else
-# include "QtCore/qvector.h"
# include <qt_windows.h>
# endif
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index 581df9242c..5757cc764c 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -141,10 +141,10 @@ public:
void setSocketNotifierPending(QSocketNotifier *notifier);
QThreadPipe threadPipe;
- QVector<pollfd> pollfds;
+ QList<pollfd> pollfds;
QHash<int, QSocketNotifierSetUNIX> socketNotifiers;
- QVector<QSocketNotifier *> pendingNotifiers;
+ QList<QSocketNotifier *> pendingNotifiers;
QTimerInfoList timerList;
QAtomicInt interrupt; // bool
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index ae6e4d3452..d3285b292f 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -53,14 +53,13 @@
//
#include <QtCore/private/qglobal_p.h>
+#include "QtCore/qcoreevent.h"
+#include "QtCore/qlist.h"
#include "QtCore/qobject.h"
#include "QtCore/qpointer.h"
+#include "QtCore/qreadwritelock.h"
#include "QtCore/qsharedpointer.h"
-#include "QtCore/qcoreevent.h"
-#include "QtCore/qlist.h"
-#include "QtCore/qvector.h"
#include "QtCore/qvariant.h"
-#include "QtCore/qreadwritelock.h"
QT_BEGIN_NAMESPACE
@@ -105,8 +104,8 @@ public:
{
ExtraData() {}
QList<QByteArray> propertyNames;
- QVector<QVariant> propertyValues;
- QVector<int> runningTimers;
+ QList<QVariant> propertyValues;
+ QList<int> runningTimers;
QList<QPointer<QObject> > eventFilters;
QString objectName;
};
diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h
index 831390de1f..e6af23e7ed 100644
--- a/src/corelib/mimetypes/qmimedatabase_p.h
+++ b/src/corelib/mimetypes/qmimedatabase_p.h
@@ -60,8 +60,8 @@ QT_REQUIRE_CONFIG(mimetype);
#include "qmimeglobpattern_p.h"
#include <QtCore/qelapsedtimer.h>
+#include <QtCore/qlist.h>
#include <QtCore/qmutex.h>
-#include <QtCore/qvector.h>
#include <vector>
#include <memory>
diff --git a/src/corelib/plugin/qpluginloader.h b/src/corelib/plugin/qpluginloader.h
index 5e417249a4..81b78aa532 100644
--- a/src/corelib/plugin/qpluginloader.h
+++ b/src/corelib/plugin/qpluginloader.h
@@ -67,7 +67,7 @@ public:
QJsonObject metaData() const;
static QObjectList staticInstances();
- static QVector<QStaticPlugin> staticPlugins();
+ static QList<QStaticPlugin> staticPlugins();
bool load();
bool unload();
@@ -93,7 +93,7 @@ class Q_CORE_EXPORT QPluginLoader
{
public:
static QObjectList staticInstances();
- static QVector<QStaticPlugin> staticPlugins();
+ static QList<QStaticPlugin> staticPlugins();
};
#endif // QT_CONFIG(library)
diff --git a/src/corelib/serialization/qcbormap.h b/src/corelib/serialization/qcbormap.h
index 1199cb47b7..7e1a4cb485 100644
--- a/src/corelib/serialization/qcbormap.h
+++ b/src/corelib/serialization/qcbormap.h
@@ -188,7 +188,7 @@ public:
qsizetype size() const noexcept Q_DECL_PURE_FUNCTION;
bool isEmpty() const { return size() == 0; }
void clear();
- QVector<QCborValue> keys() const;
+ QList<QCborValue> keys() const;
QCborValue value(qint64 key) const
{ const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
index 487173e421..b8c3dce294 100644
--- a/src/corelib/serialization/qcborvalue.h
+++ b/src/corelib/serialization/qcborvalue.h
@@ -51,7 +51,6 @@
#include <QtCore/qurl.h>
#include <QtCore/quuid.h>
#include <QtCore/qvariant.h>
-#include <QtCore/qvector.h>
// See qcborcommon.h for why we check
#if defined(QT_X11_DEFINES_FOUND)
diff --git a/src/corelib/serialization/qcborvalue_p.h b/src/corelib/serialization/qcborvalue_p.h
index cad605bd1a..3b1e45a2a8 100644
--- a/src/corelib/serialization/qcborvalue_p.h
+++ b/src/corelib/serialization/qcborvalue_p.h
@@ -131,7 +131,7 @@ public:
QByteArray::size_type usedData = 0;
QByteArray data;
- QVector<QtCbor::Element> elements;
+ QList<QtCbor::Element> elements;
void deref() { if (!ref.deref()) delete this; }
void compact(qsizetype reserved);
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h
index c11d6803ac..d00fb5e7d8 100644
--- a/src/corelib/serialization/qdatastream.h
+++ b/src/corelib/serialization/qdatastream.h
@@ -406,13 +406,13 @@ operator>>(QDataStream &s, T &t)
{ return s >> reinterpret_cast<typename std::underlying_type<T>::type &>(t); }
template<typename T>
-inline QDataStream &operator>>(QDataStream &s, QVector<T> &v)
+inline QDataStream &operator>>(QDataStream &s, QList<T> &v)
{
return QtPrivate::readArrayBasedContainer(s, v);
}
template<typename T>
-inline QDataStream &operator<<(QDataStream &s, const QVector<T> &v)
+inline QDataStream &operator<<(QDataStream &s, const QList<T> &v)
{
return QtPrivate::writeSequentialContainer(s, v);
}
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index d2bbf928d0..4589284ef3 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -113,7 +113,7 @@ struct ObjectIterator
Element m_value;
};
- using difference_type = typename QVector<Element>::difference_type;
+ using difference_type = typename QList<Element>::difference_type;
using iterator_category = std::random_access_iterator_tag;
ObjectIterator() = default;
@@ -182,8 +182,8 @@ inline bool operator==(
return a.elementsIterator() == b.elementsIterator();
}
-using KeyIterator = ObjectIterator<QtCbor::Element, QVector<QtCbor::Element>::iterator>;
-using ConstKeyIterator = ObjectIterator<const QtCbor::Element, QVector<QtCbor::Element>::const_iterator>;
+using KeyIterator = ObjectIterator<QtCbor::Element, QList<QtCbor::Element>::iterator>;
+using ConstKeyIterator = ObjectIterator<const QtCbor::Element, QList<QtCbor::Element>::const_iterator>;
template<>
inline KeyIterator::reference &KeyIterator::reference::operator=(const KeyIterator::value_type &value)
diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h
index fdc28a97e1..44f33b111b 100644
--- a/src/corelib/serialization/qxmlstream.h
+++ b/src/corelib/serialization/qxmlstream.h
@@ -44,9 +44,9 @@
#ifndef QT_NO_XMLSTREAM
-#include <QtCore/qstring.h>
-#include <QtCore/qvector.h>
+#include <QtCore/qlist.h>
#include <QtCore/qscopedpointer.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -113,7 +113,7 @@ public:
Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_MOVABLE_TYPE);
-class Q_CORE_EXPORT QXmlStreamAttributes : public QVector<QXmlStreamAttribute>
+class Q_CORE_EXPORT QXmlStreamAttributes : public QList<QXmlStreamAttribute>
{
public:
inline QXmlStreamAttributes() {}
@@ -140,7 +140,7 @@ public:
return !value(namespaceUri, name).isNull();
}
- using QVector<QXmlStreamAttribute>::append;
+ using QList<QXmlStreamAttribute>::append;
};
class Q_CORE_EXPORT QXmlStreamNamespaceDeclaration {
@@ -164,7 +164,7 @@ public:
};
Q_DECLARE_TYPEINFO(QXmlStreamNamespaceDeclaration, Q_MOVABLE_TYPE);
-typedef QVector<QXmlStreamNamespaceDeclaration> QXmlStreamNamespaceDeclarations;
+typedef QList<QXmlStreamNamespaceDeclaration> QXmlStreamNamespaceDeclarations;
class Q_CORE_EXPORT QXmlStreamNotationDeclaration {
QXmlStreamStringRef m_name, m_systemId, m_publicId;
@@ -188,7 +188,7 @@ public:
};
Q_DECLARE_TYPEINFO(QXmlStreamNotationDeclaration, Q_MOVABLE_TYPE);
-typedef QVector<QXmlStreamNotationDeclaration> QXmlStreamNotationDeclarations;
+typedef QList<QXmlStreamNotationDeclaration> QXmlStreamNotationDeclarations;
class Q_CORE_EXPORT QXmlStreamEntityDeclaration {
QXmlStreamStringRef m_name, m_notationName, m_systemId, m_publicId, m_value;
@@ -217,8 +217,7 @@ public:
};
Q_DECLARE_TYPEINFO(QXmlStreamEntityDeclaration, Q_MOVABLE_TYPE);
-typedef QVector<QXmlStreamEntityDeclaration> QXmlStreamEntityDeclarations;
-
+typedef QList<QXmlStreamEntityDeclaration> QXmlStreamEntityDeclarations;
class Q_CORE_EXPORT QXmlStreamEntityResolver
{
diff --git a/src/corelib/text/qcollator_p.h b/src/corelib/text/qcollator_p.h
index 304c7135e1..b1a483c4e2 100644
--- a/src/corelib/text/qcollator_p.h
+++ b/src/corelib/text/qcollator_p.h
@@ -54,7 +54,7 @@
#include <QtCore/private/qglobal_p.h>
#include "qcollator.h"
-#include <QVector>
+#include <QList>
#if QT_CONFIG(icu)
#include <unicode/ucol.h>
#elif defined(Q_OS_MACOS)
@@ -72,7 +72,7 @@ const CollatorType NoCollator = nullptr;
#elif defined(Q_OS_MACOS)
typedef CollatorRef CollatorType;
-typedef QVector<UCCollationValue> CollatorKeyType;
+typedef QList<UCCollationValue> CollatorKeyType;
const CollatorType NoCollator = 0;
#elif defined(Q_OS_WIN)
@@ -81,7 +81,7 @@ typedef int CollatorType;
const CollatorType NoCollator = 0;
#else // posix - ignores CollatorType collator, only handles system locale
-typedef QVector<wchar_t> CollatorKeyType;
+typedef QList<wchar_t> CollatorKeyType;
typedef bool CollatorType;
const CollatorType NoCollator = false;
#endif
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 199650be0b..95376f79c0 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -580,22 +580,20 @@ public:
QStringList split(const QString &sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT
- QVector<QStringRef> splitRef(const QString &sep,
- Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ QList<QStringRef> splitRef(const QString &sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT
QStringList split(QChar sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT
- QVector<QStringRef> splitRef(QChar sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ QList<QStringRef> splitRef(QChar sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#ifndef QT_NO_REGULAREXPRESSION
Q_REQUIRED_RESULT
QStringList split(const QRegularExpression &sep,
Qt::SplitBehavior behavior = Qt::KeepEmptyParts) const;
Q_REQUIRED_RESULT
- QVector<QStringRef> splitRef(const QRegularExpression &sep,
- Qt::SplitBehavior behavior = Qt::KeepEmptyParts) const;
+ QList<QStringRef> splitRef(const QRegularExpression &sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts) const;
#endif
template <typename Needle, typename...Flags>
@@ -647,7 +645,7 @@ public:
Q_REQUIRED_RESULT QByteArray toUtf8() const;
Q_REQUIRED_RESULT QByteArray toLocal8Bit() const;
#endif
- Q_REQUIRED_RESULT QVector<uint> toUcs4() const;
+ Q_REQUIRED_RESULT QList<uint> toUcs4() const;
// note - this are all inline so we can benefit from strlen() compile time optimizations
static inline QString fromLatin1(const char *str, int size = -1)
@@ -1414,11 +1412,11 @@ public:
int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT
- QVector<QStringRef> split(const QString &sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ QList<QStringRef> split(const QString &sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT
- QVector<QStringRef> split(QChar sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ QList<QStringRef> split(QChar sep, Qt::SplitBehavior behavior = Qt::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT QStringRef left(int n) const;
Q_REQUIRED_RESULT QStringRef right(int n) const;
@@ -1480,7 +1478,7 @@ public:
Q_REQUIRED_RESULT QByteArray toLatin1() const;
Q_REQUIRED_RESULT QByteArray toUtf8() const;
Q_REQUIRED_RESULT QByteArray toLocal8Bit() const;
- Q_REQUIRED_RESULT QVector<uint> toUcs4() const;
+ Q_REQUIRED_RESULT QList<uint> toUcs4() const;
inline void clear() { m_string = nullptr; m_position = m_size = 0; }
QString toString() const;
diff --git a/src/corelib/text/qstringalgorithms.h b/src/corelib/text/qstringalgorithms.h
index 3b67739232..4a0f7dce9a 100644
--- a/src/corelib/text/qstringalgorithms.h
+++ b/src/corelib/text/qstringalgorithms.h
@@ -93,7 +93,7 @@ Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype count(QStringView
Q_REQUIRED_RESULT Q_CORE_EXPORT QByteArray convertToLatin1(QStringView str);
Q_REQUIRED_RESULT Q_CORE_EXPORT QByteArray convertToUtf8(QStringView str);
Q_REQUIRED_RESULT Q_CORE_EXPORT QByteArray convertToLocal8Bit(QStringView str);
-Q_REQUIRED_RESULT Q_CORE_EXPORT QVector<uint> convertToUcs4(QStringView str);
+Q_REQUIRED_RESULT Q_CORE_EXPORT QList<uint> convertToUcs4(QStringView str);
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isRightToLeft(QStringView string) noexcept;
diff --git a/src/corelib/text/qstringtokenizer.h b/src/corelib/text/qstringtokenizer.h
index d042fbbdab..4db23db57f 100644
--- a/src/corelib/text/qstringtokenizer.h
+++ b/src/corelib/text/qstringtokenizer.h
@@ -329,8 +329,7 @@ public:
this->needleView(needle), sb, cs}
{}
- template <typename Container = QVector<value_type>,
- if_compatible_container<Container> = true>
+ template<typename Container = QList<value_type>, if_compatible_container<Container> = true>
Container toContainer(Container &&c = {}) const &
{
for (auto e : *this)
@@ -338,9 +337,8 @@ public:
return c;
}
- template <typename Container = QVector<value_type>,
- if_compatible_container<Container> = true,
- if_haystack_not_pinned<Container> = true>
+ template<typename Container = QList<value_type>, if_compatible_container<Container> = true,
+ if_haystack_not_pinned<Container> = true>
Container toContainer(Container &&c = {}) const &&
{
for (auto e : *this)
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index 8047050b8c..17b60fdc42 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -253,7 +253,7 @@ public:
Q_REQUIRED_RESULT QByteArray toLatin1() const { return QtPrivate::convertToLatin1(*this); }
Q_REQUIRED_RESULT QByteArray toUtf8() const { return QtPrivate::convertToUtf8(*this); }
Q_REQUIRED_RESULT QByteArray toLocal8Bit() const { return QtPrivate::convertToLocal8Bit(*this); }
- Q_REQUIRED_RESULT inline QVector<uint> toUcs4() const; // defined in qvector.h
+ Q_REQUIRED_RESULT inline QList<uint> toUcs4() const; // defined in qlist.h
Q_REQUIRED_RESULT Q_DECL_CONSTEXPR QChar at(qsizetype n) const { return (*this)[n]; }
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h
index 75c4cae0ca..2e15cbb013 100644
--- a/src/corelib/thread/qfutureinterface.h
+++ b/src/corelib/thread/qfutureinterface.h
@@ -237,7 +237,7 @@ public:
inline void reportAndMoveResult(T &&result, int index = -1);
inline void reportResult(T &&result, int index = -1);
inline void reportResult(const T &result, int index = -1);
- inline void reportResults(const QVector<T> &results, int beginIndex = -1, int count = -1);
+ inline void reportResults(const QList<T> &results, int beginIndex = -1, int count = -1);
inline void reportFinished(const T *result);
void reportFinished()
{
@@ -300,8 +300,8 @@ inline void QFutureInterface<T>::reportResult(const T &result, int index)
reportResult(&result, index);
}
-template <typename T>
-inline void QFutureInterface<T>::reportResults(const QVector<T> &_results, int beginIndex, int count)
+template<typename T>
+inline void QFutureInterface<T>::reportResults(const QList<T> &_results, int beginIndex, int count)
{
std::lock_guard<QMutex> locker{mutex()};
if (this->queryState(Canceled) || this->queryState(Finished)) {
@@ -418,7 +418,7 @@ public:
inline QFuture<void> future(); // implemented in qfuture.h
void reportResult(const void *, int) { }
- void reportResults(const QVector<void> &, int) { }
+ void reportResults(const QList<void> &, int) { }
void reportFinished(const void * = nullptr)
{
QFutureInterfaceBase::reportFinished();
diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h
index c150876e74..523c745a8e 100644
--- a/src/corelib/thread/qresultstore.h
+++ b/src/corelib/thread/qresultstore.h
@@ -49,16 +49,14 @@ QT_REQUIRE_CONFIG(future);
QT_BEGIN_NAMESPACE
-
/*
ResultStore stores indexed results. Results can be added and retrieved
- either individually batched in a QVector. Retriveing results and checking
+ either individually batched in a QList. Retriveing results and checking
which indexes are in the store can be done either by iterating or by random
accees. In addition results kan be removed from the front of the store,
either individually or in batches.
*/
-
namespace QtPrivate {
class ResultItem
@@ -116,7 +114,7 @@ public:
const T *pointer() const
{
if (mapIterator.value().isVector())
- return &(reinterpret_cast<const QVector<T> *>(mapIterator.value().result)->at(m_vectorIndex));
+ return &(reinterpret_cast<const QList<T> *>(mapIterator.value().result)->at(m_vectorIndex));
else
return reinterpret_cast<const T *>(mapIterator.value().result);
}
@@ -169,19 +167,19 @@ public:
return addResult(index, static_cast<void *>(new T(std::move_if_noexcept(result))));
}
- template <typename T>
- int addResults(int index, const QVector<T> *results)
+ template<typename T>
+ int addResults(int index, const QList<T> *results)
{
- return addResults(index, new QVector<T>(*results), results->count(), results->count());
+ return addResults(index, new QList<T>(*results), results->count(), results->count());
}
- template <typename T>
- int addResults(int index, const QVector<T> *results, int totalCount)
+ template<typename T>
+ int addResults(int index, const QList<T> *results, int totalCount)
{
if (m_filterMode == true && results->count() != totalCount && 0 == results->count())
return addResults(index, nullptr, 0, totalCount);
- return addResults(index, new QVector<T>(*results), results->count(), totalCount);
+ return addResults(index, new QList<T>(*results), results->count(), totalCount);
}
int addCanceledResult(int index)
@@ -192,7 +190,7 @@ public:
template <typename T>
int addCanceledResults(int index, int _count)
{
- QVector<T> empty;
+ QList<T> empty;
return addResults(index, &empty, _count);
}
@@ -202,7 +200,7 @@ public:
QMap<int, ResultItem>::const_iterator mapIterator = m_results.constBegin();
while (mapIterator != m_results.constEnd()) {
if (mapIterator.value().isVector())
- delete reinterpret_cast<const QVector<T> *>(mapIterator.value().result);
+ delete reinterpret_cast<const QList<T> *>(mapIterator.value().result);
else
delete reinterpret_cast<const T *>(mapIterator.value().result);
++mapIterator;
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 9255b05104..c853bd1de4 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -94,7 +94,7 @@ inline bool operator<(const QPostEvent &first, const QPostEvent &second)
// This class holds the list of posted events.
// The list has to be kept sorted by priority
-class QPostEventList : public QVector<QPostEvent>
+class QPostEventList : public QList<QPostEvent>
{
public:
// recursion == recursion count for sendPostedEvents()
@@ -107,9 +107,7 @@ public:
QMutex mutex;
- inline QPostEventList()
- : QVector<QPostEvent>(), recursion(0), startOffset(0), insertionOffset(0)
- { }
+ inline QPostEventList() : QList<QPostEvent>(), recursion(0), startOffset(0), insertionOffset(0) { }
void addEvent(const QPostEvent &ev) {
int priority = ev.priority;
@@ -129,8 +127,8 @@ public:
}
private:
//hides because they do not keep that list sorted. addEvent must be used
- using QVector<QPostEvent>::append;
- using QVector<QPostEvent>::insert;
+ using QList<QPostEvent>::append;
+ using QList<QPostEvent>::insert;
};
#if QT_CONFIG(thread)
@@ -292,7 +290,7 @@ public:
QAtomicPointer<QThread> thread;
QAtomicPointer<void> threadId;
QAtomicPointer<QAbstractEventDispatcher> eventDispatcher;
- QVector<void *> tls;
+ QList<void *> tls;
FlaggedDebugSignatures flaggedSignatures;
bool quitNow;
diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h
index 01852d8366..f019b480f5 100644
--- a/src/corelib/thread/qthreadpool_p.h
+++ b/src/corelib/thread/qthreadpool_p.h
@@ -174,7 +174,7 @@ public:
QSet<QThreadPoolThread *> allThreads;
QQueue<QThreadPoolThread *> waitingThreads;
QQueue<QThreadPoolThread *> expiredThreads;
- QVector<QueuePage*> queue;
+ QList<QueuePage *> queue;
QWaitCondition noActiveThreads;
int expiryTimeout = 30000;
diff --git a/src/corelib/time/qdatetimeparser_p.h b/src/corelib/time/qdatetimeparser_p.h
index 9a8bb7d5d9..43fe4f261e 100644
--- a/src/corelib/time/qdatetimeparser_p.h
+++ b/src/corelib/time/qdatetimeparser_p.h
@@ -54,15 +54,15 @@
#include <QtCore/private/qglobal_p.h>
#include "qplatformdefs.h"
#include "QtCore/qatomic.h"
+#include "QtCore/qcalendar.h"
+#include "QtCore/qcoreapplication.h"
#include "QtCore/qdatetime.h"
-#include "QtCore/qstringlist.h"
+#include "QtCore/qlist.h"
#include "QtCore/qlocale.h"
-#include "QtCore/qcalendar.h"
+#include "QtCore/qstringlist.h"
#ifndef QT_BOOTSTRAPPED
# include "QtCore/qvariant.h"
#endif
-#include "QtCore/qvector.h"
-#include "QtCore/qcoreapplication.h"
QT_REQUIRE_CONFIG(datetimeparser);
@@ -291,7 +291,7 @@ protected: // for the benefit of QDateTimeEditPrivate
*/
mutable int cachedDay;
mutable QString text;
- QVector<SectionNode> sectionNodes;
+ QList<SectionNode> sectionNodes;
SectionNode first, last, none, popup;
QStringList separators;
QString displayFormat;
diff --git a/src/corelib/time/qtimezone.h b/src/corelib/time/qtimezone.h
index 62ecee49bb..11070cc2eb 100644
--- a/src/corelib/time/qtimezone.h
+++ b/src/corelib/time/qtimezone.h
@@ -87,7 +87,7 @@ public:
int standardTimeOffset;
int daylightTimeOffset;
};
- typedef QVector<OffsetData> OffsetDataList;
+ typedef QList<OffsetData> OffsetDataList;
QTimeZone() noexcept;
explicit QTimeZone(const QByteArray &ianaId);
diff --git a/src/corelib/time/qtimezoneprivate_p.h b/src/corelib/time/qtimezoneprivate_p.h
index f1b7fea1f9..3f08fc15a6 100644
--- a/src/corelib/time/qtimezoneprivate_p.h
+++ b/src/corelib/time/qtimezoneprivate_p.h
@@ -52,9 +52,9 @@
// We mean it.
//
+#include "qlist.h"
#include "qtimezone.h"
#include "private/qlocale_p.h"
-#include "qvector.h"
#if QT_CONFIG(icu)
#include <unicode/ucal.h>
@@ -85,7 +85,7 @@ public:
int standardTimeOffset;
int daylightTimeOffset;
};
- typedef QVector<Data> DataList;
+ typedef QList<Data> DataList;
// Create null time zone
QTimeZonePrivate();
@@ -294,8 +294,8 @@ Q_DECL_CONSTEXPR inline bool operator!=(const QTzTransitionRule &lhs, const QTzT
// cached, avoiding the need to re-parse them from disk constantly.
struct QTzTimeZoneCacheEntry
{
- QVector<QTzTransitionTime> m_tranTimes;
- QVector<QTzTransitionRule> m_tranRules;
+ QList<QTzTransitionTime> m_tranTimes;
+ QList<QTzTransitionRule> m_tranRules;
QList<QByteArray> m_abbreviations;
QByteArray m_posixRule;
};
@@ -344,14 +344,14 @@ public:
private:
void init(const QByteArray &ianaId);
- QVector<QTimeZonePrivate::Data> getPosixTransitions(qint64 msNear) const;
+ QList<QTimeZonePrivate::Data> getPosixTransitions(qint64 msNear) const;
Data dataForTzTransition(QTzTransitionTime tran) const;
#if QT_CONFIG(icu)
mutable QSharedDataPointer<QTimeZonePrivate> m_icu;
#endif
QTzTimeZoneCacheEntry cached_data;
- QVector<QTzTransitionTime> tranCache() const { return cached_data.m_tranTimes; }
+ QList<QTzTransitionTime> tranCache() const { return cached_data.m_tranTimes; }
};
#endif // Q_OS_UNIX
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 8cf6598f10..ac7760be0b 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -205,11 +205,11 @@ public:
inline qsizetype size() const noexcept { return d.size; }
inline qsizetype count() const noexcept { return d.size; }
inline bool isEmpty() const noexcept { return !d.size; }
- inline QVector<Key> keys() const
+ inline QList<Key> keys() const
{
- QVector<Key> k;
+ QList<Key> k;
if (d.size) {
- k.reserve(typename QVector<Key>::size_type(d.size));
+ k.reserve(typename QList<Key>::size_type(d.size));
for (auto it = d.begin(); it != d.end(); ++it)
k << it.node()->key;
}
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index 81833a758f..e6ee7b56d5 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -44,8 +44,8 @@
QT_REQUIRE_CONFIG(easingcurve);
+#include <QtCore/qlist.h>
#include <QtCore/qobjectdefs.h>
-#include <QtCore/qvector.h>
QT_BEGIN_NAMESPACE
@@ -100,7 +100,7 @@ public:
void addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint);
void addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qreal b);
- QVector<QPointF> toCubicSpline() const;
+ QList<QPointF> toCubicSpline() const;
Type type() const;
void setType(Type type);
diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h
index 82a1068d34..bf0efb2543 100644
--- a/src/corelib/tools/qflatmap_p.h
+++ b/src/corelib/tools/qflatmap_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "qvector.h"
+#include "qlist.h"
#include <algorithm>
#include <functional>
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
/*
QFlatMap provides an associative container backed by sorted sequential
- containers. By default, QVector is used.
+ containers. By default, QList is used.
Keys and values are stored in two separate containers. This provides improved
cache locality for key iteration and makes keys() and values() fast
@@ -105,10 +105,8 @@ public:
}
};
-template <class Key, class T,
- class Compare = std::less<Key>,
- class KeyContainer = QVector<Key>,
- class MappedContainer = QVector<T>>
+template<class Key, class T, class Compare = std::less<Key>, class KeyContainer = QList<Key>,
+ class MappedContainer = QList<T>>
class QFlatMap : private QFlatMapValueCompare<Key, T, Compare>
{
using full_map_t = QFlatMap<Key, T, Compare, KeyContainer, MappedContainer>;
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 2c39a9dfc8..2de3989eb2 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -40,12 +40,12 @@
#ifndef QHASH_H
#define QHASH_H
-#include <QtCore/qiterator.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qrefcount.h>
-#include <QtCore/qhashfunctions.h>
#include <QtCore/qcontainertools_impl.h>
+#include <QtCore/qhashfunctions.h>
+#include <QtCore/qiterator.h>
+#include <QtCore/qlist.h>
#include <QtCore/qmath.h>
+#include <QtCore/qrefcount.h>
#include <initializer_list>
@@ -897,13 +897,10 @@ public:
return value(key);
}
- QVector<Key> keys() const
- {
- return QVector<Key>(keyBegin(), keyEnd());
- }
- QVector<Key> keys(const T &value) const
+ QList<Key> keys() const { return QList<Key>(keyBegin(), keyEnd()); }
+ QList<Key> keys(const T &value) const
{
- QVector<Key> res;
+ QList<Key> res;
const_iterator i = begin();
while (i != end()) {
if (i.value() == value)
@@ -912,10 +909,7 @@ public:
}
return res;
}
- QVector<T> values() const
- {
- return QVector<T>(begin(), end());
- }
+ QList<T> values() const { return QList<T>(begin(), end()); }
class const_iterator;
@@ -1381,9 +1375,9 @@ public:
return value(key);
}
- QVector<Key> uniqueKeys() const
+ QList<Key> uniqueKeys() const
{
- QVector<Key> res;
+ QList<Key> res;
if (d) {
auto i = d->begin();
while (i != d->end()) {
@@ -1394,13 +1388,10 @@ public:
return res;
}
- QVector<Key> keys() const
+ QList<Key> keys() const { return QList<Key>(keyBegin(), keyEnd()); }
+ QList<Key> keys(const T &value) const
{
- return QVector<Key>(keyBegin(), keyEnd());
- }
- QVector<Key> keys(const T &value) const
- {
- QVector<Key> res;
+ QList<Key> res;
const_iterator i = begin();
while (i != end()) {
if (i.value()->contains(value))
@@ -1409,13 +1400,10 @@ public:
}
return res;
}
- QVector<T> values() const
- {
- return QVector<T>(begin(), end());
- }
- QVector<T> values(const Key &key) const
+ QList<T> values() const { return QList<T>(begin(), end()); }
+ QList<T> values(const Key &key) const
{
- QVector<T> values;
+ QList<T> values;
if (d) {
Node *n = d->findNode(key);
if (n) {
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index 838cb31697..85a3882a3c 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -53,7 +53,7 @@
#include <QtCore/private/qglobal_p.h>
#include <QtCore/qbytearray.h>
-#include <QtCore/qvector.h>
+#include <QtCore/qlist.h>
QT_BEGIN_NAMESPACE
@@ -265,7 +265,7 @@ public:
}
private:
- QVector<QRingChunk> buffers;
+ QList<QRingChunk> buffers;
qint64 bufferSize;
int basicBlockSize;
};
diff --git a/src/corelib/tools/qstack.h b/src/corelib/tools/qstack.h
index e59212aa2a..a0e39f8ece 100644
--- a/src/corelib/tools/qstack.h
+++ b/src/corelib/tools/qstack.h
@@ -40,18 +40,17 @@
#ifndef QSTACK_H
#define QSTACK_H
-#include <QtCore/qvector.h>
+#include <QtCore/qlist.h>
QT_BEGIN_NAMESPACE
-
template<class T>
-class QStack : public QVector<T>
+class QStack : public QList<T>
{
public:
// compiler-generated special member functions are fine!
- inline void swap(QStack<T> &other) noexcept { QVector<T>::swap(other); } // prevent QVector<->QStack swaps
- inline void push(const T &t) { QVector<T>::append(t); }
+ inline void swap(QStack<T> &other) noexcept { QList<T>::swap(other); } // prevent QList<->QStack swaps
+ inline void push(const T &t) { QList<T>::append(t); }
T pop();
T &top();
const T &top() const;
diff --git a/src/corelib/tools/qversionnumber.h b/src/corelib/tools/qversionnumber.h
index f4e384c8dc..f8a2d8eae8 100644
--- a/src/corelib/tools/qversionnumber.h
+++ b/src/corelib/tools/qversionnumber.h
@@ -42,10 +42,10 @@
#ifndef QVERSIONNUMBER_H
#define QVERSIONNUMBER_H
+#include <QtCore/qlist.h>
+#include <QtCore/qmetatype.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qmetatype.h>
#include <QtCore/qtypeinfo.h>
#include <limits>
@@ -84,24 +84,24 @@ class QVersionNumber
union {
quintptr dummy;
qint8 inline_segments[sizeof(void*)];
- QVector<int> *pointer_segments;
+ QList<int> *pointer_segments;
};
// set the InlineSegmentMarker and set length to zero
SegmentStorage() noexcept : dummy(1) {}
- SegmentStorage(const QVector<int> &seg)
+ SegmentStorage(const QList<int> &seg)
{
if (dataFitsInline(seg.begin(), seg.size()))
setInlineData(seg.begin(), seg.size());
else
- pointer_segments = new QVector<int>(seg);
+ pointer_segments = new QList<int>(seg);
}
SegmentStorage(const SegmentStorage &other)
{
if (other.isUsingPointer())
- pointer_segments = new QVector<int>(*other.pointer_segments);
+ pointer_segments = new QList<int>(*other.pointer_segments);
else
dummy = other.dummy;
}
@@ -111,7 +111,7 @@ class QVersionNumber
if (isUsingPointer() && other.isUsingPointer()) {
*pointer_segments = *other.pointer_segments;
} else if (other.isUsingPointer()) {
- pointer_segments = new QVector<int>(*other.pointer_segments);
+ pointer_segments = new QList<int>(*other.pointer_segments);
} else {
if (isUsingPointer())
delete pointer_segments;
@@ -132,19 +132,19 @@ class QVersionNumber
return *this;
}
- explicit SegmentStorage(QVector<int> &&seg)
+ explicit SegmentStorage(QList<int> &&seg)
{
if (dataFitsInline(seg.begin(), seg.size()))
setInlineData(seg.begin(), seg.size());
else
- pointer_segments = new QVector<int>(std::move(seg));
+ pointer_segments = new QList<int>(std::move(seg));
}
SegmentStorage(std::initializer_list<int> args)
{
if (dataFitsInline(args.begin(), int(args.size()))) {
setInlineData(args.begin(), int(args.size()));
} else {
- pointer_segments = new QVector<int>(args);
+ pointer_segments = new QList<int>(args);
}
}
@@ -218,15 +218,11 @@ public:
inline QVersionNumber() noexcept
: m_segments()
{}
- inline explicit QVersionNumber(const QVector<int> &seg)
- : m_segments(seg)
- {}
+ inline explicit QVersionNumber(const QList<int> &seg) : m_segments(seg) { }
// compiler-generated copy/move ctor/assignment operators and the destructor are ok
- explicit QVersionNumber(QVector<int> &&seg)
- : m_segments(std::move(seg))
- {}
+ explicit QVersionNumber(QList<int> &&seg) : m_segments(std::move(seg)) { }
inline QVersionNumber(std::initializer_list<int> args)
: m_segments(args)
@@ -258,7 +254,7 @@ public:
Q_REQUIRED_RESULT Q_CORE_EXPORT QVersionNumber normalized() const;
- Q_REQUIRED_RESULT Q_CORE_EXPORT QVector<int> segments() const;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT QList<int> segments() const;
Q_REQUIRED_RESULT inline int segmentAt(int index) const noexcept
{ return (m_segments.size() > index) ? m_segments.at(index) : 0; }