diff --git a/src/modules/welcomeq/Config.cpp b/src/modules/welcomeq/Config.cpp index e69f9f2dd..cfa6336e2 100644 --- a/src/modules/welcomeq/Config.cpp +++ b/src/modules/welcomeq/Config.cpp @@ -18,9 +18,6 @@ #include "Config.h" -Config::Config() - : m_helpUrl( "https://www.kde.org/" ) -{ -} +Config::Config() {} Config::~Config() {} diff --git a/src/modules/welcomeq/Config.h b/src/modules/welcomeq/Config.h index 59d90e31d..01c841068 100644 --- a/src/modules/welcomeq/Config.h +++ b/src/modules/welcomeq/Config.h @@ -25,16 +25,27 @@ class Config : public QObject { Q_OBJECT - Q_PROPERTY( QUrl helpUrl READ helpUrl WRITE setHelpUrl ) + Q_PROPERTY( QUrl helpUrl READ helpUrl WRITE setHelpUrl FINAL ) + Q_PROPERTY( QUrl issuesUrl READ issuesUrl WRITE setIssuesUrl FINAL ) + Q_PROPERTY( QUrl notesUrl READ notesUrl WRITE setNotesUrl FINAL ) + Q_PROPERTY( QUrl donateUrl READ donateUrl WRITE setDonateUrl FINAL ) public: Config(); virtual ~Config(); - QUrl helpUrl() const { return m_helpUrl; } void setHelpUrl( const QUrl& url ) { m_helpUrl = url; } + void setIssuesUrl( const QUrl& url ) { m_issuesUrl = url; } + void setNotesUrl( const QUrl& url ) { m_notesUrl = url; } + void setDonateUrl( const QUrl& url ) { m_donateUrl = url; } + +public slots: + QUrl helpUrl() const { return m_helpUrl; } + QUrl issuesUrl() const { return m_issuesUrl; } + QUrl notesUrl() const { return m_notesUrl; } + QUrl donateUrl() const { return m_donateUrl; } private: - QUrl m_helpUrl; + QUrl m_helpUrl, m_issuesUrl, m_notesUrl, m_donateUrl; }; #endif diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.cpp b/src/modules/welcomeq/WelcomeQmlViewStep.cpp index e43bddc54..fbed4c382 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.cpp +++ b/src/modules/welcomeq/WelcomeQmlViewStep.cpp @@ -47,9 +47,7 @@ WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent ) } -WelcomeQmlViewStep::~WelcomeQmlViewStep() -{ -} +WelcomeQmlViewStep::~WelcomeQmlViewStep() {} QString WelcomeQmlViewStep::prettyName() const @@ -96,7 +94,9 @@ WelcomeQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) using Calamares::Branding; m_config.setHelpUrl( jobOrBrandingSetting( Branding::SupportUrl, configurationMap, "showSupportUrl" ) ); - // TODO: expand Config class and set the remaining fields + m_config.setIssuesUrl( jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) ); + m_config.setNotesUrl( jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) ); + m_config.setDonateUrl( CalamaresUtils::getString( configurationMap, "showDonateUrl" ) ); // TODO: figure out how the requirements (held by ModuleManager) should be accessible // to QML as a odel.