[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
@ -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…
Reference in New Issue
Block a user