[finishedq] Chase business logic in Config object
This commit is contained in:
parent
3ad3a9adfc
commit
5b376b41bf
@ -22,10 +22,9 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( FinishedQmlViewStepFactory, registerPlugin<
|
||||
FinishedQmlViewStep::FinishedQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( parent )
|
||||
, m_config( new Config( this ) )
|
||||
, m_installFailed( false )
|
||||
{
|
||||
auto jq = Calamares::JobQueue::instance();
|
||||
connect( jq, &Calamares::JobQueue::failed, this, &FinishedQmlViewStep::onInstallationFailed );
|
||||
connect( jq, &Calamares::JobQueue::failed, m_config, &Config::onInstallationFailed );
|
||||
|
||||
emit nextStatusChanged( true );
|
||||
}
|
||||
@ -67,8 +66,7 @@ FinishedQmlViewStep::isAtEnd() const
|
||||
void
|
||||
FinishedQmlViewStep::onActivate()
|
||||
{
|
||||
m_config->doNotify( m_installFailed );
|
||||
//connect( qApp, &QApplication::aboutToQuit, m_config, &Config::doRestart );
|
||||
m_config->doNotify();
|
||||
QmlViewStep::onActivate();
|
||||
}
|
||||
|
||||
@ -85,13 +83,6 @@ FinishedQmlViewStep::getConfig()
|
||||
return m_config;
|
||||
}
|
||||
|
||||
void
|
||||
FinishedQmlViewStep::onInstallationFailed( const QString& message, const QString& details )
|
||||
{
|
||||
m_installFailed = true;
|
||||
m_config->setRestartNowMode( Config::RestartMode::Never );
|
||||
}
|
||||
|
||||
void
|
||||
FinishedQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
|
@ -46,9 +46,6 @@ public:
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
QObject* getConfig() override;
|
||||
|
||||
public slots:
|
||||
void onInstallationFailed( const QString& message, const QString& details );
|
||||
|
||||
private:
|
||||
Config* m_config;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user