summaryrefslogtreecommitdiff
path: root/src/corelib/text/qstring.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-09 11:05:42 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-11 23:17:17 +0200
commite1d21fe813c4c9c3f53e59c08190f80b38e385da (patch)
treeada05d1793c4656a5b6e956fdf1bbeaf4e545a69 /src/corelib/text/qstring.cpp
parenta94731c2ad85f9dd40050a780f67c911bf12668e (diff)
downloadqtbase-e1d21fe813c4c9c3f53e59c08190f80b38e385da.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>
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r--src/corelib/text/qstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 4df29ab52f..12053054ba 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -2716,10 +2716,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());