From 70eb13776856a16c9a95191aa3b9b4e0a94c916b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 29 Oct 2015 09:54:43 +0100 Subject: Doc: Fix snippet tags for QString::[last]indexOf() overloads Duplicate identifiers were introduced for QString code snippets, resulting in the wrong snippets to be quoted. Change-Id: I75e9c99cbc73bf39262079f7f53342a6ac90c2a7 Task-number: QTBUG-49111 Reviewed-by: Venugopal Shivashankar --- src/corelib/doc/snippets/qstring/main.cpp | 8 ++++---- src/corelib/tools/qstring.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp index d0b5fb00f3..07ff9301bf 100644 --- a/src/corelib/doc/snippets/qstring/main.cpp +++ b/src/corelib/doc/snippets/qstring/main.cpp @@ -408,12 +408,12 @@ void Widget::firstIndexOfFunction() str.indexOf(QRegularExpression("m[aeiou]"), 0); // returns 4 //! [93] - //! [97] + //! [99] QString str = "the minimum"; QRegularExpressionMatch match; str.indexOf(QRegularExpression("m[aeiou]"), 0, &match); // returns 4 // match.captured() == mi - //! [97] + //! [99] } void Widget::insertFunction() @@ -465,12 +465,12 @@ void Widget::lastIndexOfFunction() str.lastIndexOf(QRegularExpression("m[aeiou]")); // returns 8 //! [94] - //! [98] + //! [100] QString str = "the minimum"; QRegularExpressionMatch match; str.lastIndexOf(QRegularExpression("m[aeiou]"), -1, &match); // returns 8 // match.captured() == mu - //! [98] + //! [100] } void Widget::leftFunction() diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 39e0f6825e..13d8a3864b 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3846,7 +3846,7 @@ int QString::indexOf(const QRegularExpression& re, int from) const Example: - \snippet qstring/main.cpp 97 + \snippet qstring/main.cpp 99 */ int QString::indexOf(const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const { @@ -3897,7 +3897,7 @@ int QString::lastIndexOf(const QRegularExpression &re, int from) const Example: - \snippet qstring/main.cpp 98 + \snippet qstring/main.cpp 100 */ int QString::lastIndexOf(const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const { -- cgit v1.2.3