diff options
Diffstat (limited to 'src/corelib/text')
-rw-r--r-- | src/corelib/text/qcollator_p.h | 6 | ||||
-rw-r--r-- | src/corelib/text/qstring.h | 24 | ||||
-rw-r--r-- | src/corelib/text/qstringalgorithms.h | 2 | ||||
-rw-r--r-- | src/corelib/text/qstringtokenizer.h | 8 | ||||
-rw-r--r-- | src/corelib/text/qstringview.h | 2 |
5 files changed, 19 insertions, 23 deletions
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]; } |