summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qregularexpression.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-02 12:30:14 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-03 06:50:46 +0100
commit53b7cb1bd73c773521f85c48ecd0c9daed14f7b3 (patch)
treeb338e03d80698b8ad833275e4290d82983f833a0 /src/corelib/text/qregularexpression.h
parent553d4ec464eb09e446898a9a13ffe0a2f61f8ac8 (diff)
QRegularExpression: plaster some [[nodiscard]]
On some of the "most important" API. Change-Id: I800b53bb7b9a95d0184f813e7ba501a7ebd485c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qregularexpression.h')
-rw-r--r--src/corelib/text/qregularexpression.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h
index b588dbf384..142ec7f838 100644
--- a/src/corelib/text/qregularexpression.h
+++ b/src/corelib/text/qregularexpression.h
@@ -95,6 +95,7 @@ public:
QString pattern() const;
void setPattern(const QString &pattern);
+ [[nodiscard]]
bool isValid() const;
qsizetype patternErrorOffset() const;
QString errorString() const;
@@ -118,21 +119,25 @@ public:
};
Q_DECLARE_FLAGS(MatchOptions, MatchOption)
+ [[nodiscard]]
QRegularExpressionMatch match(const QString &subject,
qsizetype offset = 0,
MatchType matchType = NormalMatch,
MatchOptions matchOptions = NoMatchOption) const;
+ [[nodiscard]]
QRegularExpressionMatch match(QStringView subjectView,
qsizetype offset = 0,
MatchType matchType = NormalMatch,
MatchOptions matchOptions = NoMatchOption) const;
+ [[nodiscard]]
QRegularExpressionMatchIterator globalMatch(const QString &subject,
qsizetype offset = 0,
MatchType matchType = NormalMatch,
MatchOptions matchOptions = NoMatchOption) const;
+ [[nodiscard]]
QRegularExpressionMatchIterator globalMatch(QStringView subjectView,
qsizetype offset = 0,
MatchType matchType = NormalMatch,