diff --git a/src/modules/welcome/checker/ResultsListWidget.cpp b/src/modules/welcome/checker/ResultsListWidget.cpp index 36286fe86..e97d7833d 100644 --- a/src/modules/welcome/checker/ResultsListWidget.cpp +++ b/src/modules/welcome/checker/ResultsListWidget.cpp @@ -128,15 +128,7 @@ ResultsListWidget::ResultsListWidget( Config* config, QWidget* parent ) mainLayout->addWidget( listview ); mainLayout->addStretch(); - connect( config, - &Config::warningMessageChanged, - [ = ]( QString s ) - { - if ( isModelFilled() ) - { - m_explanation->setText( s ); - } - } ); + connect( config, &Config::warningMessageChanged, m_explanation, &QLabel::setText ); connect( m_explanation, &QLabel::linkActivated, this, &ResultsListWidget::linkClicked ); } @@ -155,11 +147,6 @@ ResultsListWidget::linkClicked( const QString& link ) void ResultsListWidget::requirementsChanged() { - if ( !isModelFilled() ) - { - return; - } - // Check that all are satisfied (gives warnings if not) and // all *mandatory* entries are satisfied (gives errors if not). @@ -204,18 +191,6 @@ ResultsListWidget::requirementsChanged() } } -bool -ResultsListWidget::isModelFilled() -{ - if ( m_config->requirementsModel()->count() < m_requirementsSeen ) - { - return false; - } - m_requirementsSeen = m_config->requirementsModel()->count(); - return true; -} - - #include "utils/moc-warnings.h" #include "ResultsListWidget.moc" diff --git a/src/modules/welcome/checker/ResultsListWidget.h b/src/modules/welcome/checker/ResultsListWidget.h index a75748e3f..d83a4bd96 100644 --- a/src/modules/welcome/checker/ResultsListWidget.h +++ b/src/modules/welcome/checker/ResultsListWidget.h @@ -32,19 +32,6 @@ private: /// @brief The model of requirements changed void requirementsChanged(); - /** @brief The model can be reset and re-filled, is it full yet? - * - * We count how many requirements we have seen; since the model - * does not shrink, we can avoid reacting to model-is-cleared - * events because the size of the model is then (briefly) smaller - * than what we expect. - * - * Returns true if the model contains at least m_requirementsSeen - * elements, and updates m_requirementsSeen. (Which is why the - * method is not const) - */ - bool isModelFilled(); - Config* m_config = nullptr; // UI parts, which need updating when the model changes @@ -56,8 +43,6 @@ private: // it is placed in the central layout. QWidget* m_centralWidget = nullptr; QBoxLayout* m_centralLayout = nullptr; - - int m_requirementsSeen = 0; }; #endif // CHECKER_RESULTSLISTWIDGET_H