diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-09-16 09:06:44 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-09-16 09:33:52 +0200 |
commit | 0a035bd773d14ae4684f65caeffa2ad55acaee25 (patch) | |
tree | b9cf19f6077e834fcc1fc8bbb31e48bb1325ae7d /src/remoteobjects | |
parent | 943036215e25fd0315886e29780f5c58aab44181 (diff) |
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.cpp | 4 |
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)); |