From 6db7aceb43903a0f4441aa37456c5bf4b7b2b6bd Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 22 Sep 2020 17:13:34 +0200 Subject: Fix some qdoc warnings: QRegularExpression parameters Change-Id: Ib4d33327c6c059e11d8615bac0f72d9f028d5860 Reviewed-by: Giuseppe D'Angelo --- src/corelib/text/qregularexpression.cpp | 12 +++++++----- 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; -- cgit v1.2.3