summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qregularexpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qregularexpression.h')
-rw-r--r--src/corelib/tools/qregularexpression.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h
index 66538f22b3..8e19a53142 100644
--- a/src/corelib/tools/qregularexpression.h
+++ b/src/corelib/tools/qregularexpression.h
@@ -77,11 +77,11 @@ public:
QRegularExpression &operator=(const QRegularExpression &re);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpression &operator=(QRegularExpression &&re)
+ QRegularExpression &operator=(QRegularExpression &&re) Q_DECL_NOTHROW
{ d.swap(re.d); return *this; }
#endif
- inline void swap(QRegularExpression &re) { d.swap(re.d); }
+ void swap(QRegularExpression &other) Q_DECL_NOTHROW { d.swap(other.d); }
QString pattern() const;
void setPattern(const QString &pattern);
@@ -112,11 +112,21 @@ public:
MatchType matchType = NormalMatch,
MatchOptions matchOptions = NoMatchOption) const;
+ QRegularExpressionMatch match(const QStringRef &subjectRef,
+ int offset = 0,
+ MatchType matchType = NormalMatch,
+ MatchOptions matchOptions = NoMatchOption) const;
+
QRegularExpressionMatchIterator globalMatch(const QString &subject,
int offset = 0,
MatchType matchType = NormalMatch,
MatchOptions matchOptions = NoMatchOption) const;
+ QRegularExpressionMatchIterator globalMatch(const QStringRef &subjectRef,
+ int offset = 0,
+ MatchType matchType = NormalMatch,
+ MatchOptions matchOptions = NoMatchOption) const;
+
void optimize() const;
static QString escape(const QString &str);
@@ -159,10 +169,10 @@ public:
QRegularExpressionMatch &operator=(const QRegularExpressionMatch &match);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match)
+ QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) Q_DECL_NOTHROW
{ d.swap(match.d); return *this; }
#endif
- inline void swap(QRegularExpressionMatch &match) { d.swap(match.d); }
+ void swap(QRegularExpressionMatch &other) Q_DECL_NOTHROW { d.swap(other.d); }
QRegularExpression regularExpression() const;
QRegularExpression::MatchType matchType() const;
@@ -216,10 +226,10 @@ public:
QRegularExpressionMatchIterator(const QRegularExpressionMatchIterator &iterator);
QRegularExpressionMatchIterator &operator=(const QRegularExpressionMatchIterator &iterator);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator)
+ QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) Q_DECL_NOTHROW
{ d.swap(iterator.d); return *this; }
#endif
- void swap(QRegularExpressionMatchIterator &iterator) { d.swap(iterator.d); }
+ void swap(QRegularExpressionMatchIterator &other) Q_DECL_NOTHROW { d.swap(other.d); }
bool isValid() const;