mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
moved QEventLoops inside functions
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
06e1cab41f
commit
0a95b57c0a
6 changed files with 35 additions and 27 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue