QRegularExpression: eradicate QT_STRINGVIEW_LEVEL
It's not used and not useful. Task-number: QTBUG-100861 Change-Id: Ie28d07474ee8fae96b569632d835dbb0ffd0e48f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 04c54858c705fc8c951a438127c7791dd455b194) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
6844ad149d
commit
0b62d7118f
@ -1786,12 +1786,10 @@ size_t qHash(const QRegularExpression &key, size_t seed) noexcept
|
||||
return qHashMulti(seed, key.d->pattern, key.d->patternOptions);
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
/*!
|
||||
\fn QString QRegularExpression::escape(const QString &str)
|
||||
\overload
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.15
|
||||
@ -1848,13 +1846,11 @@ QString QRegularExpression::escape(QStringView str)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
/*!
|
||||
\since 5.12
|
||||
\fn QString QRegularExpression::wildcardToRegularExpression(const QString &pattern, WildcardConversionOptions options)
|
||||
\overload
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 6.0
|
||||
@ -2024,13 +2020,11 @@ QRegularExpression QRegularExpression::fromWildcard(QStringView pattern, Qt::Cas
|
||||
return QRegularExpression(wildcardToRegularExpression(pattern, options), reOptions);
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
/*!
|
||||
\fn QRegularExpression::anchoredPattern(const QString &expression)
|
||||
\since 5.12
|
||||
\overload
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.15
|
||||
@ -2235,7 +2229,6 @@ QStringView QRegularExpressionMatch::capturedView(int nth) const
|
||||
return d->subject.mid(start, capturedLength(nth));
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
/*! \fn QString QRegularExpressionMatch::captured(const QString &name) const
|
||||
|
||||
Returns the substring captured by the capturing group named \a name.
|
||||
@ -2246,7 +2239,6 @@ QStringView QRegularExpressionMatch::capturedView(int nth) const
|
||||
\sa capturedView(), capturedStart(), capturedEnd(), capturedLength(),
|
||||
QString::isNull()
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.10
|
||||
@ -2353,7 +2345,6 @@ qsizetype QRegularExpressionMatch::capturedEnd(int nth) const
|
||||
return d->capturedOffsets.at(nth * 2 + 1);
|
||||
}
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
/*! \fn qsizetype QRegularExpressionMatch::capturedStart(const QString &name) const
|
||||
|
||||
Returns the offset inside the subject string corresponding to the starting
|
||||
@ -2384,7 +2375,6 @@ qsizetype QRegularExpressionMatch::capturedEnd(int nth) const
|
||||
|
||||
\sa capturedStart(), capturedLength(), captured()
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.10
|
||||
|
@ -155,7 +155,6 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(WildcardConversionOptions, WildcardConversionOption)
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
static QString escape(const QString &str)
|
||||
{
|
||||
return escape(qToStringViewIgnoringNull(str));
|
||||
@ -170,7 +169,6 @@ public:
|
||||
{
|
||||
return anchoredPattern(qToStringViewIgnoringNull(expression));
|
||||
}
|
||||
#endif
|
||||
|
||||
static QString escape(QStringView str);
|
||||
static QString wildcardToRegularExpression(QStringView str, WildcardConversionOptions options = DefaultWildcardConversion);
|
||||
@ -236,11 +234,8 @@ public:
|
||||
QString captured(int nth = 0) const;
|
||||
QStringView capturedView(int nth = 0) const;
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
QString captured(const QString &name) const
|
||||
{ return captured(QStringView(name)); }
|
||||
#endif
|
||||
|
||||
QString captured(QStringView name) const;
|
||||
QStringView capturedView(QStringView name) const;
|
||||
|
||||
@ -250,14 +245,12 @@ public:
|
||||
qsizetype capturedLength(int nth = 0) const;
|
||||
qsizetype capturedEnd(int nth = 0) const;
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
qsizetype capturedStart(const QString &name) const
|
||||
{ return capturedStart(QStringView(name)); }
|
||||
qsizetype capturedLength(const QString &name) const
|
||||
{ return capturedLength(QStringView(name)); }
|
||||
qsizetype capturedEnd(const QString &name) const
|
||||
{ return capturedEnd(QStringView(name)); }
|
||||
#endif
|
||||
|
||||
qsizetype capturedStart(QStringView name) const;
|
||||
qsizetype capturedLength(QStringView name) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user