diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-09 16:27:12 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-05-14 14:19:47 +0200 |
commit | b2ee684a13d01363c121d3ba597feaf274786fdb (patch) | |
tree | 61fa7ee93b6778a0edfb309896bdee3b3173044c /src/corelib/text/qstringlist.h | |
parent | 7370b60cfe11da4d6167b51d83d18d9514a370c5 (diff) |
Remove QRegExp support from QString and StringList
Replacement methods do now exist in QRegExp, or
for QRegularExpression when porting to it.
Remove all autotests associated with the old methods.
Change-Id: I3ff1e0da4b53adb64d5a48a30aecd8b960f5e633
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringlist.h')
-rw-r--r-- | src/corelib/text/qstringlist.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/corelib/text/qstringlist.h b/src/corelib/text/qstringlist.h index c03e34b9ba..b94671746b 100644 --- a/src/corelib/text/qstringlist.h +++ b/src/corelib/text/qstringlist.h @@ -45,13 +45,11 @@ #include <QtCore/qalgorithms.h> #include <QtCore/qcontainertools_impl.h> -#include <QtCore/qregexp.h> #include <QtCore/qstring.h> #include <QtCore/qstringmatcher.h> QT_BEGIN_NAMESPACE -class QRegExp; class QRegularExpression; #if !defined(QT_NO_JAVA_STYLE_ITERATORS) @@ -91,11 +89,6 @@ public: inline QStringList &replaceInStrings(QStringView before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); #endif -#ifndef QT_NO_REGEXP - inline QStringList filter(const QRegExp &rx) const; - inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after); -#endif - #if QT_CONFIG(regularexpression) inline QStringList filter(const QRegularExpression &re) const; inline QStringList &replaceInStrings(const QRegularExpression &re, const QString &after); @@ -147,13 +140,6 @@ public: inline int lastIndexOf(QStringView str, int from = -1) const; inline int lastIndexOf(QLatin1String str, int from = -1) const; -#ifndef QT_NO_REGEXP - inline int indexOf(const QRegExp &rx, int from = 0) const; - inline int lastIndexOf(const QRegExp &rx, int from = -1) const; - inline int indexOf(QRegExp &rx, int from = 0) const; - inline int lastIndexOf(QRegExp &rx, int from = -1) const; -#endif - #if QT_CONFIG(regularexpression) inline int indexOf(const QRegularExpression &re, int from = 0) const; inline int lastIndexOf(const QRegularExpression &re, int from = -1) const; @@ -196,15 +182,6 @@ namespace QtPrivate { Qt::CaseSensitivity cs); #endif -#ifndef QT_NO_REGEXP - void Q_CORE_EXPORT QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after); - QStringList Q_CORE_EXPORT QStringList_filter(const QStringList *that, const QRegExp &re); - int Q_CORE_EXPORT QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from); - int Q_CORE_EXPORT QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from); - int Q_CORE_EXPORT QStringList_indexOf(const QStringList *that, QRegExp &rx, int from); - int Q_CORE_EXPORT QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from); -#endif - #if QT_CONFIG(regularexpression) void Q_CORE_EXPORT QStringList_replaceInStrings(QStringList *that, const QRegularExpression &rx, const QString &after); QStringList Q_CORE_EXPORT QStringList_filter(const QStringList *that, const QRegularExpression &re); @@ -327,39 +304,6 @@ inline int QStringList::lastIndexOf(QLatin1String string, int from) const return QtPrivate::lastIndexOf<QString, QLatin1String>(*this, string, from); } -#ifndef QT_NO_REGEXP -inline QStringList &QVectorSpecialMethods<QString>::replaceInStrings(const QRegExp &rx, const QString &after) -{ - QtPrivate::QStringList_replaceInStrings(self(), rx, after); - return *self(); -} - -inline QStringList QVectorSpecialMethods<QString>::filter(const QRegExp &rx) const -{ - return QtPrivate::QStringList_filter(self(), rx); -} - -inline int QStringList::indexOf(const QRegExp &rx, int from) const -{ - return QtPrivate::QStringList_indexOf(this, rx, from); -} - -inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const -{ - return QtPrivate::QStringList_lastIndexOf(this, rx, from); -} - -inline int QStringList::indexOf(QRegExp &rx, int from) const -{ - return QtPrivate::QStringList_indexOf(this, rx, from); -} - -inline int QStringList::lastIndexOf(QRegExp &rx, int from) const -{ - return QtPrivate::QStringList_lastIndexOf(this, rx, from); -} -#endif - #if QT_CONFIG(regularexpression) inline QStringList &QVectorSpecialMethods<QString>::replaceInStrings(const QRegularExpression &rx, const QString &after) { |