From 4fd2c8fe1d679302391218aec03aa309afd38c55 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 9 Oct 2022 11:05:42 +0200 Subject: [PATCH] QString: rename parameter clashing with member function of the same name The size parameter shadows the size() member function, so rename it to newSize. Prepares for a follow-up change that ports from count()/length() to size(). Change-Id: I0ca8af57d6351f85a568409a8d02b66371bb05e7 Reviewed-by: Thiago Macieira (cherry picked from commit e1d21fe813c4c9c3f53e59c08190f80b38e385da) --- src/corelib/text/qstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 87ced6c080a..90c51b365b3 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -2652,10 +2652,10 @@ void QString::resize(qsizetype size) \snippet qstring/main.cpp 46 */ -void QString::resize(qsizetype size, QChar fillChar) +void QString::resize(qsizetype newSize, QChar fillChar) { const qsizetype oldSize = length(); - resize(size); + resize(newSize); const qsizetype difference = length() - oldSize; if (difference > 0) std::fill_n(d.data() + oldSize, difference, fillChar.unicode());