Read a prompt-install variable from settings.conf.

main
Teo Mrnjavac 10 years ago
parent e6748f8656
commit b86193824d

@ -45,6 +45,7 @@ Settings::Settings( const QString& settingsFilePath,
QObject* parent )
: QObject( parent )
, m_debug( debugMode )
, m_promptInstall( false )
{
cDebug() << "Using Calamares settings file at" << settingsFilePath;
QFile file( settingsFilePath );
@ -93,6 +94,7 @@ Settings::Settings( const QString& settingsFilePath,
config[ "postinstall" ] >> m_modulesPostInstallList;
m_brandingComponentName = QString::fromStdString( config[ "branding" ]
.as< std::string >() );
m_promptInstall = config[ "prompt-install" ].as< bool >();
}
catch ( YAML::Exception& e )
{
@ -139,6 +141,13 @@ Settings::brandingComponentName() const
}
bool
Settings::showPromptBeforeInstall() const
{
return m_promptInstall;
}
bool
Settings::debugMode() const
{

@ -46,6 +46,8 @@ public:
QString brandingComponentName() const;
bool showPromptBeforeInstall() const;
bool debugMode() const;
private:
@ -60,6 +62,8 @@ private:
QStringList m_modulesPostInstallList;
QString m_brandingComponentName;
bool m_promptInstall;
};
}

Loading…
Cancel
Save