diff --git a/src/libcalamares/Settings.cpp b/src/libcalamares/Settings.cpp index 26d746b96..7f3cec8ed 100644 --- a/src/libcalamares/Settings.cpp +++ b/src/libcalamares/Settings.cpp @@ -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 ) diff --git a/src/libcalamares/Settings.h b/src/libcalamares/Settings.h index 99f4667e9..3ae35c25e 100644 --- a/src/libcalamares/Settings.h +++ b/src/libcalamares/Settings.h @@ -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;