diff options
Diffstat (limited to 'src/corelib/tools/qregularexpression.h')
-rw-r--r-- | src/corelib/tools/qregularexpression.h | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h index 66538f22b3..d2abfc7701 100644 --- a/src/corelib/tools/qregularexpression.h +++ b/src/corelib/tools/qregularexpression.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>. ** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -11,9 +11,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -24,8 +24,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -77,11 +77,11 @@ public: QRegularExpression &operator=(const QRegularExpression &re); #ifdef Q_COMPILER_RVALUE_REFS - inline QRegularExpression &operator=(QRegularExpression &&re) + QRegularExpression &operator=(QRegularExpression &&re) Q_DECL_NOTHROW { d.swap(re.d); return *this; } #endif - inline void swap(QRegularExpression &re) { d.swap(re.d); } + void swap(QRegularExpression &other) Q_DECL_NOTHROW { d.swap(other.d); } QString pattern() const; void setPattern(const QString &pattern); @@ -112,11 +112,21 @@ public: MatchType matchType = NormalMatch, MatchOptions matchOptions = NoMatchOption) const; + QRegularExpressionMatch match(const QStringRef &subjectRef, + int offset = 0, + MatchType matchType = NormalMatch, + MatchOptions matchOptions = NoMatchOption) const; + QRegularExpressionMatchIterator globalMatch(const QString &subject, int offset = 0, MatchType matchType = NormalMatch, MatchOptions matchOptions = NoMatchOption) const; + QRegularExpressionMatchIterator globalMatch(const QStringRef &subjectRef, + int offset = 0, + MatchType matchType = NormalMatch, + MatchOptions matchOptions = NoMatchOption) const; + void optimize() const; static QString escape(const QString &str); @@ -159,10 +169,10 @@ public: QRegularExpressionMatch &operator=(const QRegularExpressionMatch &match); #ifdef Q_COMPILER_RVALUE_REFS - inline QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) + QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) Q_DECL_NOTHROW { d.swap(match.d); return *this; } #endif - inline void swap(QRegularExpressionMatch &match) { d.swap(match.d); } + void swap(QRegularExpressionMatch &other) Q_DECL_NOTHROW { d.swap(other.d); } QRegularExpression regularExpression() const; QRegularExpression::MatchType matchType() const; @@ -216,10 +226,10 @@ public: QRegularExpressionMatchIterator(const QRegularExpressionMatchIterator &iterator); QRegularExpressionMatchIterator &operator=(const QRegularExpressionMatchIterator &iterator); #ifdef Q_COMPILER_RVALUE_REFS - inline QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) + QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) Q_DECL_NOTHROW { d.swap(iterator.d); return *this; } #endif - void swap(QRegularExpressionMatchIterator &iterator) { d.swap(iterator.d); } + void swap(QRegularExpressionMatchIterator &other) Q_DECL_NOTHROW { d.swap(other.d); } bool isValid() const; |