Merge PR #599: Make init call for python plugins blocking

This commit is contained in:
jenkins 2022-12-13 21:04:58 +01:00
commit d2d61bfe58

View File

@ -441,6 +441,13 @@ void PythonIntegrationPlugin::init()
m_mutex.unlock();
callPluginFunction("init");
// Waiting for the init to finish. In case a plugin needs to do some more stuff in init we don't
// want to run setupThing() before the init finishes.
if (m_runningTasks.values().contains("init")) {
QFutureWatcher<void> *watcher = m_runningTasks.key("init");
watcher->waitForFinished();
}
}
void PythonIntegrationPlugin::startMonitoringAutoThings()