Read a prompt-install variable from settings.conf.

This commit is contained in:
Teo Mrnjavac 2015-04-10 12:37:58 +02:00
parent e6748f8656
commit b86193824d
2 changed files with 13 additions and 0 deletions

View File

@ -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
{

View File

@ -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;
};
}