Skip to content
Permalink
Browse files

[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).
  • Loading branch information...
adriaandegroot committed May 27, 2019
1 parent 2b91608 commit 2e39f24bb0c72ab0921742316a6540f150e1e4a8
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/libcalamaresui/modulesystem/RequirementsChecker.cpp
@@ -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.";

0 comments on commit 2e39f24

Please sign in to comment.
You can’t perform that action at this time.