diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-21 08:59:26 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-21 08:59:26 +0100 |
commit | cc920b4cddc170a7442d8fdfb53076c208a3d71e (patch) | |
tree | e4757cffe420bd3c61dda1d369b452a0fac9eff7 /src/corelib/tools/qstring.h | |
parent | c8c8cc790a315710b0dae2282dc32e3472e107ee (diff) | |
parent | fc8fd508165c8e4dcfe0da397b63cf99f15178e3 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index d93891248f..447f000486 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -353,7 +353,7 @@ public: inline bool contains(QRegExp &rx) const { return indexOf(rx) != -1; } #endif -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) int indexOf(const QRegularExpression &re, int from = 0) const; int indexOf(const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const; // ### Qt 6: merge overloads int lastIndexOf(const QRegularExpression &re, int from = -1) const; @@ -377,7 +377,7 @@ public: #ifndef QT_NO_REGEXP QString section(const QRegExp ®, int start, int end = -1, SectionFlags flags = SectionDefault) const; #endif -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) QString section(const QRegularExpression &re, int start, int end = -1, SectionFlags flags = SectionDefault) const; #endif Q_REQUIRED_RESULT QString left(int n) const; @@ -505,7 +505,7 @@ public: inline QString &remove(const QRegExp &rx) { return replace(rx, QString()); } #endif -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) QString &replace(const QRegularExpression &re, const QString &after); inline QString &remove(const QRegularExpression &re) { return replace(re, QString()); } @@ -525,7 +525,7 @@ public: Q_REQUIRED_RESULT QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const; Q_REQUIRED_RESULT QVector<QStringRef> splitRef(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const; #endif -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) Q_REQUIRED_RESULT QStringList split(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const; Q_REQUIRED_RESULT QVector<QStringRef> splitRef(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const; #endif @@ -1860,6 +1860,12 @@ QT_DEPRECATED inline QString escape(const QString &plain) { #endif } +namespace QtPrivate { +// used by qPrintable() and qUtf8Printable() macros +inline const QString &asString(const QString &s) { return s; } +inline QString &&asString(QString &&s) { return std::move(s); } +} + QT_END_NAMESPACE #if defined(QT_USE_FAST_OPERATOR_PLUS) || defined(QT_USE_QSTRINGBUILDER) |