[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 )
|
FinishedQmlViewStep::FinishedQmlViewStep( QObject* parent )
|
||||||
: Calamares::QmlViewStep( parent )
|
: Calamares::QmlViewStep( parent )
|
||||||
, m_config( new Config( this ) )
|
, m_config( new Config( this ) )
|
||||||
, m_installFailed( false )
|
|
||||||
{
|
{
|
||||||
auto jq = Calamares::JobQueue::instance();
|
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 );
|
emit nextStatusChanged( true );
|
||||||
}
|
}
|
||||||
@ -67,8 +66,7 @@ FinishedQmlViewStep::isAtEnd() const
|
|||||||
void
|
void
|
||||||
FinishedQmlViewStep::onActivate()
|
FinishedQmlViewStep::onActivate()
|
||||||
{
|
{
|
||||||
m_config->doNotify( m_installFailed );
|
m_config->doNotify();
|
||||||
//connect( qApp, &QApplication::aboutToQuit, m_config, &Config::doRestart );
|
|
||||||
QmlViewStep::onActivate();
|
QmlViewStep::onActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,13 +83,6 @@ FinishedQmlViewStep::getConfig()
|
|||||||
return m_config;
|
return m_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
FinishedQmlViewStep::onInstallationFailed( const QString& message, const QString& details )
|
|
||||||
{
|
|
||||||
m_installFailed = true;
|
|
||||||
m_config->setRestartNowMode( Config::RestartMode::Never );
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FinishedQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
FinishedQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
|
@ -46,9 +46,6 @@ public:
|
|||||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||||
QObject* getConfig() override;
|
QObject* getConfig() override;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void onInstallationFailed( const QString& message, const QString& details );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Config* m_config;
|
Config* m_config;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user