mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
[libcalamaresui] Make sure finished() is processed once
- Avoid races which might double-delete the timer, or enter the if twice (which would lead to duplicate emissions of requirementsComplete and the associated UI glitches).
This commit is contained in:
parent
2b91608b82
commit
2e39f24bb0
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ RequirementsChecker::run()
|
|||
void
|
||||
RequirementsChecker::finished()
|
||||
{
|
||||
static QMutex finishedMutex;
|
||||
QMutexLocker lock( &finishedMutex );
|
||||
|
||||
if ( m_progressTimer && std::all_of( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && w->isFinished(); } ) )
|
||||
{
|
||||
cDebug() << "All requirements have been checked.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue