diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-22 17:13:34 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-22 22:49:22 +0200 |
commit | 6db7aceb43903a0f4441aa37456c5bf4b7b2b6bd (patch) | |
tree | 39ac7ab1d76791c0f0ba0339c4f7752bf16018be | |
parent | 25cc901f049cdabcffda02b640a9a684fca8caa4 (diff) |
Fix some qdoc warnings: QRegularExpression parameters
Change-Id: Ib4d33327c6c059e11d8615bac0f72d9f028d5860
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r-- | src/corelib/text/qregularexpression.cpp | 12 | ||||
-rw-r--r-- | src/corelib/text/qregularexpression.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp index b02ed6365d..bfd483b9e2 100644 --- a/src/corelib/text/qregularexpression.cpp +++ b/src/corelib/text/qregularexpression.cpp @@ -1793,7 +1793,7 @@ QString QRegularExpression::escape(QStringView str) #if QT_STRINGVIEW_LEVEL < 2 /*! \since 5.12 - \fn QString QRegularExpression::wildcardToRegularExpression(const QString &pattern, WildcardConversionType type) + \fn QString QRegularExpression::wildcardToRegularExpression(const QString &pattern, WildcardConversionOptions options) \overload */ #endif // QT_STRINGVIEW_LEVEL < 2 @@ -1826,7 +1826,7 @@ QString QRegularExpression::escape(QStringView str) By default, the returned regular expression is fully anchored. In other words, there is no need of calling anchoredPattern() again on the result. To get an a regular expression that is not anchored, pass - UnanchoredWildcardConversion as the conversion \a option. + UnanchoredWildcardConversion as the conversion \a options. This implementation follows closely the definition of wildcard for glob patterns: @@ -1947,7 +1947,9 @@ QString QRegularExpression::wildcardToRegularExpression(QStringView pattern, Wil /*! \since 6.0 - Returns a regular expression of the glob pattern \a pattern. + Returns a regular expression of the glob pattern \a pattern. The regular expression + will be case sensitive if \a cs is \l{Qt::CaseSensitive}, and converted according to + \a options. Equivalent to \code @@ -1956,12 +1958,12 @@ QString QRegularExpression::wildcardToRegularExpression(QStringView pattern, Wil return QRegularExpression(wildcardToRegularExpression(str, options), reOptions); \endcode */ -QRegularExpression QRegularExpression::fromWildcard(QStringView str, Qt::CaseSensitivity cs, +QRegularExpression QRegularExpression::fromWildcard(QStringView pattern, Qt::CaseSensitivity cs, WildcardConversionOptions options) { auto reOptions = cs == Qt::CaseSensitive ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption; - return QRegularExpression(wildcardToRegularExpression(str, options), reOptions); + return QRegularExpression(wildcardToRegularExpression(pattern, options), reOptions); } #if QT_STRINGVIEW_LEVEL < 2 diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index 6af48f5fb0..22b63a2252 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -166,7 +166,7 @@ public: static QString wildcardToRegularExpression(QStringView str, WildcardConversionOptions options = DefaultWildcardConversion); static QString anchoredPattern(QStringView expression); - static QRegularExpression fromWildcard(QStringView str, Qt::CaseSensitivity cs = Qt::CaseInsensitive, + static QRegularExpression fromWildcard(QStringView pattern, Qt::CaseSensitivity cs = Qt::CaseInsensitive, WildcardConversionOptions options = DefaultWildcardConversion); bool operator==(const QRegularExpression &re) const; |