summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-11-28 15:17:13 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-12-01 09:54:57 +0200
commit7ccada5c9cfaa9916cd73dc9d217670fc9031677 (patch)
tree4dd5f99e9c961075ea63c7df8fd37175ccb61fd2 /src/libs
parent51e02b08abb44131929dba2d86860d10ca17cf41 (diff)
Fix user set binary marker not having any effect on maintenance tool
TabController would invoke IntroductionPage::onCoreNetworkSettings- Changed() slot, which would disable the UI controls for selecting the package manager or updater mode in case the maintenance tool is configured to use only temporary repositories that are set only later on. This would also update the internal magic marker indicating the binary type, overwriting the user selected one that was passed with one of the --start-* options. Fix by splitting the resetting of the "metadata fetched" state of the page to its own public method from IntroductionPage::onCoreNetwork- SettingsChanged(), and call that from the TabController initialization instead. Task-number: QTIFW-2884 Change-Id: I952b8fd1d14e6292bae1556a5f33dec537c8b1d6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/packagemanagergui.cpp15
-rw-r--r--src/libs/installer/packagemanagergui.h2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 2715155ff..bec77b886 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -1740,6 +1740,17 @@ void IntroductionPage::setMaintainerToolsEnabled(bool enable)
&& ProductKeyCheck::instance()->hasValidKey());
}
+/*!
+ Resets the internal page state, so that on clicking \uicontrol Next the metadata needs to be
+ fetched again.
+*/
+void IntroductionPage::resetFetchedState()
+{
+ m_updatesFetched = false;
+ m_allPackagesFetched = false;
+ m_forceUpdate = false;
+}
+
// -- public slots
/*!
@@ -1881,9 +1892,7 @@ void IntroductionPage::initializePage()
*/
void IntroductionPage::onCoreNetworkSettingsChanged()
{
- m_updatesFetched = false;
- m_allPackagesFetched = false;
- m_forceUpdate = false;
+ resetFetchedState();
PackageManagerCore *core = packageManagerCore();
if (core->isUninstaller() || core->isMaintainer()) {
diff --git a/src/libs/installer/packagemanagergui.h b/src/libs/installer/packagemanagergui.h
index 5f4bd6157..0b804e934 100644
--- a/src/libs/installer/packagemanagergui.h
+++ b/src/libs/installer/packagemanagergui.h
@@ -236,6 +236,8 @@ public:
void setMaintenanceToolsEnabled(bool enable);
void setMaintainerToolsEnabled(bool enable);
+ void resetFetchedState();
+
public Q_SLOTS:
void onCoreNetworkSettingsChanged();
void setMessage(const QString &msg);