diff --git a/src/libcalamaresui/modulesystem/RequirementsChecker.cpp b/src/libcalamaresui/modulesystem/RequirementsChecker.cpp index b6af4bcf4..68569635b 100644 --- a/src/libcalamaresui/modulesystem/RequirementsChecker.cpp +++ b/src/libcalamaresui/modulesystem/RequirementsChecker.cpp @@ -66,6 +66,7 @@ RequirementsChecker::RequirementsChecker( QVector< Module* > modules, QObject* p : QObject( parent ) , m_modules( std::move( modules ) ) , m_progressTimer( nullptr ) + , m_progressTimeouts( 0 ) { m_watchers.reserve( m_modules.count() ); m_collectedRequirements.reserve( m_modules.count() ); @@ -135,9 +136,15 @@ RequirementsChecker::addCheckedRequirements( RequirementsList l ) void RequirementsChecker::reportProgress() { + m_progressTimeouts++; + auto remaining = std::count_if( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && !w->isFinished(); } ); if ( remaining > 0 ) - emit requirementsProgress( tr( "Waiting for %n module(s).", "", remaining ) ); + { + QString waiting = tr( "Waiting for %n module(s).", "", remaining ); + QString elapsed = tr( "(%n second(s))", "", m_progressTimeouts * m_progressTimer->interval() / 1000 ); + emit requirementsProgress( waiting + QString( " " ) + elapsed ); + } else emit requirementsProgress( tr( "System-requirements checking is complete." ) ); } diff --git a/src/libcalamaresui/modulesystem/RequirementsChecker.h b/src/libcalamaresui/modulesystem/RequirementsChecker.h index af46a4ab2..6e681971c 100644 --- a/src/libcalamaresui/modulesystem/RequirementsChecker.h +++ b/src/libcalamaresui/modulesystem/RequirementsChecker.h @@ -79,6 +79,7 @@ private: RequirementsList m_collectedRequirements; QTimer *m_progressTimer; + unsigned m_progressTimeouts; } ; }