mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
io/fileview: fix swapped new/old branch in JsonAdapter deserialize
This commit is contained in:
2 files changed
+6
-5
No files matched your search
@@ -12,3 +12,4 @@
|
|||||||
- Fixed unhandled notifications sending `NotificationClosed` out of order.
|
- Fixed unhandled notifications sending `NotificationClosed` out of order.
|
||||||
- Fixed `qs kill` not waiting for the process to exit.
|
- Fixed `qs kill` not waiting for the process to exit.
|
||||||
- Fixed IPC calls from children of a crashed and relaunched process crashing.
|
- Fixed IPC calls from children of a crashed and relaunched process crashing.
|
||||||
|
- Fixed JsonAdapter crashing when deserializing new objects into an array.
|
||||||
@@ -225,15 +225,15 @@ void JsonAdapter::deserializeRec(const QJsonObject& json, QObject* obj, const QM
|
|||||||
const auto& jsonValue = array.at(i);
|
const auto& jsonValue = array.at(i);
|
||||||
if (jsonValue.isObject()) {
|
if (jsonValue.isObject()) {
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
currentValue = lp.at(&lp, i);
|
|
||||||
if (this->oldCreatedObjects.removeOne(currentValue)) {
|
|
||||||
this->createdObjects.push_back(currentValue);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// FIXME: should be the type inside the QQmlListProperty but how can we get that?
|
// FIXME: should be the type inside the QQmlListProperty but how can we get that?
|
||||||
currentValue = static_cast<JsonObject*>(QMetaType::fromType<JsonObject>().create());
|
currentValue = static_cast<JsonObject*>(QMetaType::fromType<JsonObject>().create());
|
||||||
currentValue->setParent(this);
|
currentValue->setParent(this);
|
||||||
this->createdObjects.push_back(currentValue);
|
this->createdObjects.push_back(currentValue);
|
||||||
|
} else {
|
||||||
|
currentValue = lp.at(&lp, i);
|
||||||
|
if (this->oldCreatedObjects.removeOne(currentValue)) {
|
||||||
|
this->createdObjects.push_back(currentValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->deserializeRec(
|
this->deserializeRec(
|
||||||
|
|||||||
Reference in new issue
Block a user