summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-11-26 07:21:55 -0800
committerThiago Macieira <thiago.macieira@intel.com>2019-12-05 07:59:07 -0800
commit1f592da7f175aa75726eece2fab8f5c1edde193f (patch)
treedde433457546250a471333cf27cff9a1d6b6311e /src/corelib
parent455e9e5be35b36d79b9541a6e014c5c9026d685b (diff)
QCborValue: fix replacing of elements with byte data with ones without
We forgot to reset the flags when replacing the element, so we ended up with an integer with HasByteData after: testMap[0] = QStringLiteral("value"); testMap[0] = 42; Fixes: QTBUG-80342 Change-Id: Ia2aa807ffa8a4c798425fffd15dabfa066ea84b0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/serialization/qcborvalue_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/serialization/qcborvalue_p.h b/src/corelib/serialization/qcborvalue_p.h
index 590c2d6e05..48818e4c63 100644
--- a/src/corelib/serialization/qcborvalue_p.h
+++ b/src/corelib/serialization/qcborvalue_p.h
@@ -196,8 +196,7 @@ public:
if (value.container)
return replaceAt_complex(e, value, disp);
- e.value = value.value_helper();
- e.type = value.type();
+ e = { value.value_helper(), value.type() };
if (value.isContainer())
e.container = nullptr;
}