summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2019-01-08 12:33:05 +0200
committerKatja Marttila <katja.marttila@qt.io>2019-01-09 05:42:47 +0000
commitafd61c9700ea24569ade2af9e7ec0a268b02b98a (patch)
tree96270ad2158247ed549946df51313e82d194edec
parentbf87c91dfe16881c366775549364862372dde8f7 (diff)
Hide category widgets in updater mode
We don't need categories in updater mode, the categories were accidently visible if we first visited the 'Add or remove components' page before going to 'Update components' Task-number: QTIFW-1259 Change-Id: I945c2b7e8cdfbb8bfeefbfa0ed07222189573179 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r--src/libs/installer/componentselectionpage_p.cpp9
-rw-r--r--src/libs/installer/componentselectionpage_p.h1
-rw-r--r--src/libs/installer/packagemanagergui.cpp4
3 files changed, 13 insertions, 1 deletions
diff --git a/src/libs/installer/componentselectionpage_p.cpp b/src/libs/installer/componentselectionpage_p.cpp
index 9b8c86efb..f77e0ae4b 100644
--- a/src/libs/installer/componentselectionpage_p.cpp
+++ b/src/libs/installer/componentselectionpage_p.cpp
@@ -213,6 +213,15 @@ void ComponentSelectionPagePrivate::setupCategoryLayout()
m_mainHLayout->insertWidget(0, m_categoryWidget);
}
+void ComponentSelectionPagePrivate::showCategoryLayout(bool show)
+{
+ if (show) {
+ setupCategoryLayout();
+ }
+ if (m_categoryWidget)
+ m_categoryWidget->setVisible(show);
+}
+
void ComponentSelectionPagePrivate::updateTreeView()
{
m_checkDefault->setVisible(m_core->isInstaller() || m_core->isPackageManager());
diff --git a/src/libs/installer/componentselectionpage_p.h b/src/libs/installer/componentselectionpage_p.h
index bc1e6ed7a..ece8ef911 100644
--- a/src/libs/installer/componentselectionpage_p.h
+++ b/src/libs/installer/componentselectionpage_p.h
@@ -64,6 +64,7 @@ public:
void showCompressedRepositoryButton();
void hideCompressedRepositoryButton();
void setupCategoryLayout();
+ void showCategoryLayout(bool show);
void updateTreeView();
public slots:
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 3fd35a5c8..dfa7542c6 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -1912,7 +1912,9 @@ void ComponentSelectionPage::entering()
setModified(isComplete());
if (core->settings().repositoryCategories().count() > 0 && !core->isOfflineOnly()
&& !core->isUpdater()) {
- d->setupCategoryLayout();
+ d->showCategoryLayout(true);
+ } else {
+ d->showCategoryLayout(false);
}
d->showCompressedRepositoryButton();
}