summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-09-16 09:06:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-09-16 09:33:52 +0200
commit0a035bd773d14ae4684f65caeffa2ad55acaee25 (patch)
treeb9cf19f6077e834fcc1fc8bbb31e48bb1325ae7d /src/remoteobjects
parent943036215e25fd0315886e29780f5c58aab44181 (diff)
Fix leading empty strings appearing in parameter names when converting ASTHEADdev
The helper toByteArrayList(), called from classToDefinition(), mistakenly called QList(qsizetype) where reserve() was intended, causing the construction of a list with n empty elements. Fixes: PYSIDE-3179 Task-number: QTBUG-139845 Pick-to: 6.10 6.10.0 6.9 6.8 Change-Id: Ib1046e31e17d178a9804af5f137892184030d521 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
Diffstat (limited to 'src/remoteobjects')
-rw-r--r--src/remoteobjects/qremoteobjectrepparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remoteobjects/qremoteobjectrepparser.cpp b/src/remoteobjects/qremoteobjectrepparser.cpp
index a5311c6..f7a8863 100644
--- a/src/remoteobjects/qremoteobjectrepparser.cpp
+++ b/src/remoteobjects/qremoteobjectrepparser.cpp
@@ -28,8 +28,8 @@ static QByteArrayList toByteArrayList(const QStringList &stringList)
/*
* Helper method to convert a list of strings into a list of QByteArrays
*/
- QByteArrayList byteArrayList(stringList.size());
-
+ QByteArrayList byteArrayList;
+ byteArrayList.reserve(stringList.size());
for (const QString &str : stringList)
byteArrayList.append(toQBA(str));