diff options
Diffstat (limited to 'src/corelib/text/qregularexpression.h')
-rw-r--r-- | src/corelib/text/qregularexpression.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index 0f8f1a151f..24fa4ea9da 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -226,7 +226,8 @@ public: QStringView capturedView(int nth = 0) const; #if QT_STRINGVIEW_LEVEL < 2 - QString captured(const QString &name) const; + QString captured(const QString &name) const + { return captured(QStringView(name)); } #endif QString captured(QStringView name) const; @@ -239,9 +240,12 @@ public: qsizetype capturedEnd(int nth = 0) const; #if QT_STRINGVIEW_LEVEL < 2 - qsizetype capturedStart(const QString &name) const; - qsizetype capturedLength(const QString &name) const; - qsizetype capturedEnd(const QString &name) const; + 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; |