[welcome] Update the results-list when a round of checks completes
When the checks were done, the widget showing the countdown-timer and results was not being informed, so it didn't update the display of the countdown timer or hide the list of problems (when there are none) so that the welcome image is shown. FIXES #1974
This commit is contained in:
parent
d4a776e759
commit
f958a3c2f7
@ -71,7 +71,11 @@ CheckerContainer::requirementsComplete( bool ok )
|
||||
m_waitingWidget->deleteLater();
|
||||
m_waitingWidget = nullptr; // Don't delete in destructor
|
||||
}
|
||||
if ( !m_checkerWidget )
|
||||
if ( m_checkerWidget )
|
||||
{
|
||||
m_checkerWidget->requirementsComplete();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_checkerWidget = new ResultsListWidget( m_config, this );
|
||||
m_checkerWidget->setObjectName( "requirementsChecker" );
|
||||
|
@ -67,18 +67,25 @@ ResultsListWidget::ResultsListWidget( Config* config, QWidget* parent )
|
||||
}
|
||||
|
||||
void
|
||||
ResultsListWidget::requirementsChanged()
|
||||
ResultsListWidget::requirementsComplete()
|
||||
{
|
||||
// Check that all are satisfied (gives warnings if not) and
|
||||
// all *mandatory* entries are satisfied (gives errors if not).
|
||||
|
||||
// Check that the satisfaction of the requirements:
|
||||
// - if everything is satisfied, show the welcome image
|
||||
// - otherwise, if all the mandatory ones are satisfied,
|
||||
// we won't be re-checking (see ModuleManager::checkRequirements)
|
||||
// so hide the countdown,
|
||||
// - otherwise we have unsatisfied mandatory requirements,
|
||||
// so keep the countdown and the list of problems.
|
||||
const bool requirementsSatisfied = m_config->requirementsModel()->satisfiedRequirements();
|
||||
const bool mandatoryRequirementsSatisfied = m_config->requirementsModel()->satisfiedMandatory();
|
||||
|
||||
if ( requirementsSatisfied )
|
||||
if ( mandatoryRequirementsSatisfied )
|
||||
{
|
||||
m_countdown->stop();
|
||||
m_countdown->hide();
|
||||
|
||||
}
|
||||
if ( requirementsSatisfied )
|
||||
{
|
||||
delete m_centralWidget;
|
||||
m_centralWidget = nullptr;
|
||||
|
||||
|
@ -26,10 +26,10 @@ class ResultsListWidget : public QWidget
|
||||
public:
|
||||
explicit ResultsListWidget( Config* config, QWidget* parent );
|
||||
|
||||
private:
|
||||
/// @brief The model of requirements changed
|
||||
void requirementsChanged();
|
||||
/// @brief The model of requirements has finished a round of checking
|
||||
void requirementsComplete();
|
||||
|
||||
private:
|
||||
Config* m_config = nullptr;
|
||||
|
||||
// UI parts, which need updating when the model changes
|
||||
|
Loading…
Reference in New Issue
Block a user