[summaryq] No need to be a ParserStatus object

Config classes, which intend to be shared between widgets-
and QML-based view-steps, should not tie closely to internals.
None of the ParserStatus methods are used in a meaningful
way (init() can be called by the view step).
main
Adriaan de Groot 4 years ago
parent 768760793a
commit 235db9f961

@ -98,13 +98,7 @@ Config::retranslate()
}
void
Config::componentComplete()
{
refresh();
}
void
Config::refresh()
Config::init()
{
Calamares::ViewStepList steps;
for ( Calamares::ViewStep* step : Calamares::ViewManager::instance()->viewSteps() )
@ -133,9 +127,3 @@ Config::refresh()
m_summary->setSummaryList( steps );
}
void
Config::init()
{
refresh();
}

@ -58,7 +58,7 @@ private:
QVector< StepSummary > m_summary;
};
class Config : public QObject, public QQmlParserStatus
class Config : public QObject
{
Q_OBJECT
@ -71,10 +71,8 @@ class Config : public QObject, public QQmlParserStatus
public:
explicit Config( Calamares::ViewStep* parent = nullptr );
virtual void componentComplete() override;
virtual void classBegin() override {}
void refresh();
///@brief Called later, to load the model once all viewsteps are there
void init();
QAbstractListModel* summaryModel() const { return m_summary; }

Loading…
Cancel
Save