diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-11-16 12:00:14 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-11-16 12:00:14 (GMT) |
commit | 6df2f295c7efddac12de87f8bfa347ab28761a6b (patch) | |
tree | 10c66cf4e407b3c05ba96b441b72bb00b7be1fc4 /src/corelib/tools/qregexp.cpp | |
parent | 15e2b2d753250bbe01a78d9ece37f0f0b08cd21c (diff) | |
parent | 2b60b542a5f51cb983e4ad99c5fdf4e962b59b89 (diff) | |
download | Qt-6df2f295c7efddac12de87f8bfa347ab28761a6b.zip Qt-6df2f295c7efddac12de87f8bfa347ab28761a6b.tar.gz Qt-6df2f295c7efddac12de87f8bfa347ab28761a6b.tar.bz2 |
Merge commit 's60/4.6' into mmfphonon
Diffstat (limited to 'src/corelib/tools/qregexp.cpp')
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 1f23211..3ca8ab9 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -1083,7 +1083,7 @@ public: bool isValid() const { return valid; } const QString &errorString() const { return yyError; } - int numCaptures() const { return officialncap; } + int captureCount() const { return officialncap; } int createState(QChar ch); int createState(const QRegExpCharClass &cc); @@ -1378,7 +1378,7 @@ void QRegExpMatchState::prepareForMatch(QRegExpEngine *eng) #else int newSlideTabSize = 0; #endif - int numCaptures = eng->numCaptures(); + int numCaptures = eng->captureCount(); int newCapturedSize = 2 + 2 * numCaptures; bigArray = q_check_ptr((int *)realloc(bigArray, ((3 + 4 * ncap) * ns + 4 * ncap + newSlideTabSize + newCapturedSize)*sizeof(int))); @@ -4168,12 +4168,24 @@ int QRegExp::matchedLength() const #ifndef QT_NO_REGEXP_CAPTURE /*! + \obsolete Returns the number of captures contained in the regular expression. + + \sa captureCount() */ int QRegExp::numCaptures() const { + return captureCount(); +} + +/*! + \since 4.6 + Returns the number of captures contained in the regular expression. + */ +int QRegExp::captureCount() const +{ prepareEngine(priv); - return priv->eng->numCaptures(); + return priv->eng->captureCount(); } /*! |