diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-15 10:52:51 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-05-06 09:57:40 +0200 |
commit | adf829e65d0837c043dbfdfaba49dd145debe954 (patch) | |
tree | c45291cbe4ff82b9ec2d5f2ae008066b839dfd1a /src/corelib/text/qregularexpression.h | |
parent | 56a7984a90992371cd7f54a061dcc791e6f22cfd (diff) |
Add a QRegularExpression::fromWildcard() convenience method
Simplify constructing QRegularExpression objects from a glob
pattern.
Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/text/qregularexpression.h')
-rw-r--r-- | src/corelib/text/qregularexpression.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index cfb7f34d9d..10ff2e94cb 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -165,6 +165,9 @@ public: static QString wildcardToRegularExpression(QStringView str, WildcardConversionOptions options = DefaultWildcardConversion); static QString anchoredPattern(QStringView expression); + static QRegularExpression fromWildcard(QStringView str, Qt::CaseSensitivity cs = Qt::CaseInsensitive, + WildcardConversionOptions options = DefaultWildcardConversion); + bool operator==(const QRegularExpression &re) const; inline bool operator!=(const QRegularExpression &re) const { return !operator==(re); } |