Read a prompt-install variable from settings.conf.
This commit is contained in:
parent
e6748f8656
commit
b86193824d
@ -45,6 +45,7 @@ Settings::Settings( const QString& settingsFilePath,
|
|||||||
QObject* parent )
|
QObject* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
, m_debug( debugMode )
|
, m_debug( debugMode )
|
||||||
|
, m_promptInstall( false )
|
||||||
{
|
{
|
||||||
cDebug() << "Using Calamares settings file at" << settingsFilePath;
|
cDebug() << "Using Calamares settings file at" << settingsFilePath;
|
||||||
QFile file( settingsFilePath );
|
QFile file( settingsFilePath );
|
||||||
@ -93,6 +94,7 @@ Settings::Settings( const QString& settingsFilePath,
|
|||||||
config[ "postinstall" ] >> m_modulesPostInstallList;
|
config[ "postinstall" ] >> m_modulesPostInstallList;
|
||||||
m_brandingComponentName = QString::fromStdString( config[ "branding" ]
|
m_brandingComponentName = QString::fromStdString( config[ "branding" ]
|
||||||
.as< std::string >() );
|
.as< std::string >() );
|
||||||
|
m_promptInstall = config[ "prompt-install" ].as< bool >();
|
||||||
}
|
}
|
||||||
catch ( YAML::Exception& e )
|
catch ( YAML::Exception& e )
|
||||||
{
|
{
|
||||||
@ -139,6 +141,13 @@ Settings::brandingComponentName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
Settings::showPromptBeforeInstall() const
|
||||||
|
{
|
||||||
|
return m_promptInstall;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Settings::debugMode() const
|
Settings::debugMode() const
|
||||||
{
|
{
|
||||||
|
@ -46,6 +46,8 @@ public:
|
|||||||
|
|
||||||
QString brandingComponentName() const;
|
QString brandingComponentName() const;
|
||||||
|
|
||||||
|
bool showPromptBeforeInstall() const;
|
||||||
|
|
||||||
bool debugMode() const;
|
bool debugMode() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -60,6 +62,8 @@ private:
|
|||||||
QStringList m_modulesPostInstallList;
|
QStringList m_modulesPostInstallList;
|
||||||
|
|
||||||
QString m_brandingComponentName;
|
QString m_brandingComponentName;
|
||||||
|
|
||||||
|
bool m_promptInstall;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user