TaskTree: Clear old storages on root setup

Change-Id: Ic32dedb1f427b238427df675e9c882c15d359da4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-20 11:11:23 +01:00
parent 98ff1d32f9
commit ec28990dd5

View File

@@ -718,6 +718,7 @@ void TaskTree::setupRoot(const Tasking::Group &root)
QTC_ASSERT(!isRunning(), qWarning("The TaskTree is already running, ignoring..."); return); QTC_ASSERT(!isRunning(), qWarning("The TaskTree is already running, ignoring..."); return);
QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The setupRoot() is called from one of the" QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The setupRoot() is called from one of the"
"TaskTree handlers, ingoring..."); return); "TaskTree handlers, ingoring..."); return);
d->m_storages.clear();
d->m_root.reset(new TaskNode(d, nullptr, root)); d->m_root.reset(new TaskNode(d, nullptr, root));
} }