diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/installer/component.cpp | 7 | ||||
-rw-r--r-- | src/libs/installer/component.h | 1 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercore.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index fc689f911..03810bf97 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -1263,6 +1263,11 @@ bool Component::isInstalled() const */ bool Component::installationRequested() const { + return installAction() == Install; +} + +bool Component::isSelectedForInstallation() const +{ return !isInstalled() && isSelected(); } @@ -1293,7 +1298,7 @@ bool Component::updateRequested() */ bool Component::componentChangeRequested() { - return updateRequested() || installationRequested() || uninstallationRequested(); + return updateRequested() || isSelectedForInstallation() || uninstallationRequested(); } diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h index b8e4e93b1..3382dcf0d 100644 --- a/src/libs/installer/component.h +++ b/src/libs/installer/component.h @@ -180,6 +180,7 @@ public: Q_INVOKABLE void setInstalled(); Q_INVOKABLE bool isInstalled() const; Q_INVOKABLE bool installationRequested() const; + bool isSelectedForInstallation() const; Q_INVOKABLE void setUninstalled(); Q_INVOKABLE bool isUninstalled() const; diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 4af1fa658..821b10515 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1283,7 +1283,7 @@ QList<Component *> PackageManagerCore::componentsMarkedForInstallation() const foreach (Component *component, relevant) { // ask for all components which will be installed to get all dependencies // even dependencies which are changed without an increased version - if (component->installationRequested() + if (component->isSelectedForInstallation() || (component->isInstalled() && !component->uninstallationRequested())) { markedForInstallation.append(component); diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 5717eebca..ebaf4d92c 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -1665,7 +1665,7 @@ bool PackageManagerCorePrivate::runPackageUpdater() // There is a replacement, but the replacement is not scheduled for update, keep it as well. if (m_componentsToReplaceAllMode.contains(name) - && !m_componentsToReplaceAllMode.value(name).first->installationRequested()) { + && !m_componentsToReplaceAllMode.value(name).first->isSelectedForInstallation()) { nonRevertedOperations.append(operation); continue; } |