libcalamares: add accessor for settings path

This commit is contained in:
Adriaan de Groot 2023-11-07 00:21:21 +01:00
parent cfadf8f95a
commit 18689074a8
2 changed files with 5 additions and 0 deletions

View File

@ -250,6 +250,7 @@ Settings::Settings( bool debugMode )
Settings::Settings( const QString& settingsFilePath, bool debugMode )
: QObject()
, m_settingsPath( settingsFilePath )
, m_debug( debugMode )
, m_doChroot( true )
, m_promptInstall( false )

View File

@ -89,6 +89,9 @@ public:
/// @brief Explicif filename, debug is always true (for testing)
static Settings* init( const QString& filename );
/// @brief Get the path this settings was created for (may be empty)
QString path() const { return m_settingsPath; }
QStringList modulesSearchPaths() const;
using InstanceDescriptionList = QList< InstanceDescription >;
@ -177,6 +180,7 @@ public:
private:
static Settings* s_instance;
QString m_settingsPath;
QStringList m_modulesSearchPaths;