moved QEventLoops inside functions

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-06-22 12:48:55 +03:00
parent 06e1cab41f
commit 0a95b57c0a
6 changed files with 35 additions and 27 deletions
+10
View File
@@ -254,4 +254,14 @@ BaseVersion::Ptr VersionList::getRecommended() const
return m_recommended;
}
void VersionList::waitToLoad()
{
if (isLoaded())
return;
QEventLoop ev;
auto task = getLoadTask();
QObject::connect(task.get(), &Task::finished, &ev, &QEventLoop::quit);
task->start();
ev.exec();
}
} // namespace Meta