From 6b89883f6aedea5c3ec82c26f960ab98b70e23e4 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sun, 27 Nov 2022 20:56:41 +0200 Subject: [PATCH] QString: name args in replace() overloads consistently Change-Id: I169ecbc4ceaa6eded236fc7421a9eb2e782c6b9a Reviewed-by: Thiago Macieira --- src/corelib/text/qstring.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index a41712149c..58bba15a05 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -3598,13 +3598,13 @@ QString &QString::replace(qsizetype pos, qsizetype len, const QString &after) } /*! - \fn QString &QString::replace(qsizetype position, qsizetype n, const QChar *unicode, qsizetype size) + \fn QString &QString::replace(qsizetype position, qsizetype n, const QChar *after, qsizetype alen) \overload replace() Replaces \a n characters beginning at index \a position with the - first \a size characters of the QChar array \a unicode and returns a + first \a alen characters of the QChar array \a after and returns a reference to this string. */ -QString &QString::replace(qsizetype pos, qsizetype len, const QChar *unicode, qsizetype size) +QString &QString::replace(qsizetype pos, qsizetype len, const QChar *after, qsizetype alen) { if (size_t(pos) > size_t(this->size())) return *this; @@ -3612,7 +3612,7 @@ QString &QString::replace(qsizetype pos, qsizetype len, const QChar *unicode, qs len = this->size() - pos; size_t index = pos; - replace_helper(*this, &index, 1, len, unicode, size); + replace_helper(*this, &index, 1, len, after, alen); return *this; }