From c758421af60842219d2b04b4024103c48d5db32c Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 11 Jul 2024 01:43:54 -0700 Subject: [PATCH] core/reloader: fix Reloadable::onReload being called multiple times onReload was called multiple times due to Reloadable::reloadRecursive calling onReload instead of reload, which didn't set reloadComplete. This allowed the componentComplete fallback to call reload later. --- src/core/reload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/reload.cpp b/src/core/reload.cpp index 4940ddc8..c62706ab 100644 --- a/src/core/reload.cpp +++ b/src/core/reload.cpp @@ -86,7 +86,7 @@ void Reloadable::reloadRecursive(QObject* newObj, QObject* oldRoot) { // pass handling to the child's onReload, which should call back into reloadRecursive, // with its oldInstance becoming the new oldRoot. - reloadable->onReload(oldInstance); + reloadable->reload(oldInstance); } else if (newObj != nullptr) { Reloadable::reloadChildrenRecursive(newObj, oldRoot); }