diff options
| author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-05-04 11:33:10 +0200 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-04 17:38:40 +0200 |
| commit | 0f7987f0c934b311bd39a5a496ffb0c6128eb8df (patch) | |
| tree | dea392deb3c43e377a224271c4f450dcff3fc76f /src/corelib/serialization/qjsonobject.cpp | |
| parent | ea7d85457d30e915ad470919d2e74867cba9cad8 (diff) | |
| parent | f0ea852d4dd6b3139869a952ee92e74cd367866d (diff) | |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/corelib/text/qlocale.cpp
src/network/access/qnetworkaccessmanager.cpp
Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt
Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
Diffstat (limited to 'src/corelib/serialization/qjsonobject.cpp')
| -rw-r--r-- | src/corelib/serialization/qjsonobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp index a03855d4a34..bf2bdb957dd 100644 --- a/src/corelib/serialization/qjsonobject.cpp +++ b/src/corelib/serialization/qjsonobject.cpp @@ -577,7 +577,7 @@ void QJsonObject::removeImpl(T key) if (!keyExists) return; - removeAt(index); + removeAt(index / 2); } #if QT_STRINGVIEW_LEVEL < 2 @@ -629,7 +629,7 @@ QJsonValue QJsonObject::takeImpl(T key) return QJsonValue(QJsonValue::Undefined); const QJsonValue v = QJsonPrivate::Value::fromTrustedCbor(o->extractAt(index + 1)); - removeAt(index); + removeAt(index / 2); return v; } @@ -1486,8 +1486,8 @@ void QJsonObject::setValueAt(int i, const QJsonValue &val) void QJsonObject::removeAt(int index) { detach2(); - o->removeAt(index + 1); - o->removeAt(index); + o->removeAt(2 * index + 1); + o->removeAt(2 * index); } size_t qHash(const QJsonObject &object, size_t seed) |
