From b86193824d34cfe2b751c17cf3e64b4069b89a9c Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 10 Apr 2015 12:37:58 +0200 Subject: [PATCH] Read a prompt-install variable from settings.conf. --- src/libcalamaresui/Settings.cpp | 9 +++++++++ src/libcalamaresui/Settings.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/libcalamaresui/Settings.cpp b/src/libcalamaresui/Settings.cpp index 204b895fe..4d440c713 100644 --- a/src/libcalamaresui/Settings.cpp +++ b/src/libcalamaresui/Settings.cpp @@ -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 { diff --git a/src/libcalamaresui/Settings.h b/src/libcalamaresui/Settings.h index fbe060cd8..0610eaa27 100644 --- a/src/libcalamaresui/Settings.h +++ b/src/libcalamaresui/Settings.h @@ -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; }; }