QRegularExpression: eradicate QT_STRINGVIEW_LEVEL
It's not used and not useful. Task-number: QTBUG-100861 Pick-to: 6.3 6.2 Change-Id: Ie28d07474ee8fae96b569632d835dbb0ffd0e48f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
ff4f2e9397
commit
04c54858c7
@ -1797,12 +1797,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
|
||||
@ -1858,13 +1856,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
|
||||
@ -2034,13 +2030,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
|
||||
@ -2302,7 +2296,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.
|
||||
@ -2313,7 +2306,6 @@ QStringView QRegularExpressionMatch::capturedView(int nth) const
|
||||
\sa capturedView(), capturedStart(), capturedEnd(), capturedLength(),
|
||||
QString::isNull()
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.10
|
||||
@ -2420,7 +2412,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
|
||||
@ -2451,7 +2442,6 @@ qsizetype QRegularExpressionMatch::capturedEnd(int nth) const
|
||||
|
||||
\sa capturedStart(), capturedLength(), captured()
|
||||
*/
|
||||
#endif // QT_STRINGVIEW_LEVEL < 2
|
||||
|
||||
/*!
|
||||
\since 5.10
|
||||
|
@ -153,7 +153,6 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(WildcardConversionOptions, WildcardConversionOption)
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
static QString escape(const QString &str)
|
||||
{
|
||||
return escape(qToStringViewIgnoringNull(str));
|
||||
@ -168,7 +167,6 @@ public:
|
||||
{
|
||||
return anchoredPattern(qToStringViewIgnoringNull(expression));
|
||||
}
|
||||
#endif
|
||||
|
||||
static QString escape(QStringView str);
|
||||
static QString wildcardToRegularExpression(QStringView str, WildcardConversionOptions options = DefaultWildcardConversion);
|
||||
@ -231,21 +229,16 @@ public:
|
||||
|
||||
int lastCapturedIndex() const;
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
bool hasCaptured(const QString &name) const
|
||||
{ return hasCaptured(QStringView(name)); }
|
||||
#endif
|
||||
bool hasCaptured(QStringView name) const;
|
||||
bool hasCaptured(int nth) const;
|
||||
|
||||
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;
|
||||
|
||||
@ -255,14 +248,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…
Reference in New Issue
Block a user