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.
This commit is contained in:
outfoxxed 2024-07-11 01:43:54 -07:00
parent 49b309247d
commit c758421af6
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -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);
}