diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index b7bcdd457..37c489135 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -24,8 +24,8 @@ #include "PackageModel.h" #include "ui_page_netinst.h" -#include "GlobalStorage.h" #include "JobQueue.h" + #include "utils/Logger.h" #include "utils/Retranslator.h" #include "utils/YamlUtils.h" @@ -128,12 +128,8 @@ NetInstallPage::selectedPackages() const } void -NetInstallPage::loadGroupList() +NetInstallPage::loadGroupList( const QString& confUrl ) { - QString confUrl( - Calamares::JobQueue::instance()->globalStorage()->value( - "groupsUrl" ).toString() ); - QNetworkRequest request; request.setUrl( QUrl( confUrl ) ); // Follows all redirects except unsafe ones (https to http). diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 58308412d..3dc8ee46e 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -25,13 +25,14 @@ #include "PackageTreeItem.h" #include "Typedefs.h" -#include #include #include +#include // required forward declarations class QByteArray; class QNetworkReply; +class QString; namespace Ui { @@ -46,10 +47,12 @@ public: void onActivate(); - // Retrieves the groups, with name, description and packages, from - // the remote URL configured in the settings. Assumes the URL is already - // in the global storage. This should be called before displaying the page. - void loadGroupList(); + /** @brief Retrieves the groups, with name, description and packages + * + * Loads data from the given URL. This should be called before + * displaying the page. + */ + void loadGroupList( const QString& url ); // Sets the "required" state of netinstall data. Influences whether // corrupt or unavailable data causes checkReady() to be emitted diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 5744891cc..de4480cbb 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -186,8 +186,10 @@ NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap ) QString groupsUrl = CalamaresUtils::getString( configurationMap, "groupsUrl" ); if ( !groupsUrl.isEmpty() ) { + // Keep putting groupsUrl into the global storage, + // even though it's no longer used for in-module data-passing. Calamares::JobQueue::instance()->globalStorage()->insert( "groupsUrl", groupsUrl ); - m_widget->loadGroupList(); + m_widget->loadGroupList( groupsUrl ); } }