diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-09 11:05:42 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-11-18 13:59:17 +0100 |
commit | 4fd2c8fe1d679302391218aec03aa309afd38c55 (patch) | |
tree | 7b25c22ac44b4331d214f4d23b6d37384042e13f | |
parent | 04f6f4afa9ca5591d5a4e5932853c6cecffccf08 (diff) | |
download | qtbase-4fd2c8fe1d679302391218aec03aa309afd38c55.tar.gz |
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 <thiago.macieira@intel.com>
(cherry picked from commit e1d21fe813c4c9c3f53e59c08190f80b38e385da)
-rw-r--r-- | src/corelib/text/qstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 87ced6c080..90c51b365b 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()); |