diff options
4 files changed, 12 insertions, 13 deletions
diff --git a/installerbuilder/installerbase/installerbasecommons.cpp b/installerbuilder/installerbase/installerbasecommons.cpp index 768699227..b483f4adb 100644 --- a/installerbuilder/installerbase/installerbasecommons.cpp +++ b/installerbuilder/installerbase/installerbasecommons.cpp @@ -346,11 +346,11 @@ int InstallerGui::nextId() const core->calculateComponentsToInstall(); foreach (Component* component, core->orderedComponentsToInstall()) { if (!component->licenses().isEmpty()) - return QWizard::nextId(); + return next; } return nextNextId; } - return QWizard::nextId(); + return next; } @@ -397,11 +397,11 @@ int MaintenanceGui::nextId() const if (component->isInstalled()) continue; if (!component->licenses().isEmpty()) - return QWizard::nextId(); + return next; } return nextNextId; } - return QWizard::nextId(); + return next; } void MaintenanceGui::updateRestartPage() diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp index ef855409d..2b601ee1b 100644 --- a/installerbuilder/libinstaller/packagemanagercore_p.cpp +++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp @@ -267,7 +267,6 @@ QString PackageManagerCorePrivate::componentsXmlPath() const void PackageManagerCorePrivate::clearAllComponentLists() { - clearComponentsToInstall(); qDeleteAll(m_rootComponents); m_rootComponents.clear(); @@ -275,11 +274,11 @@ void PackageManagerCorePrivate::clearAllComponentLists() for (int i = 0; i < list.count(); ++i) delete list.at(i).second; m_componentsToReplaceAllMode.clear(); + m_componentsToInstallCalculated = false; } void PackageManagerCorePrivate::clearUpdaterComponentLists() { - clearComponentsToInstall(); qDeleteAll(m_updaterComponents); m_updaterComponents.clear(); @@ -290,6 +289,7 @@ void PackageManagerCorePrivate::clearUpdaterComponentLists() for (int i = 0; i < list.count(); ++i) delete list.at(i).second; m_componentsToReplaceUpdaterMode.clear(); + m_componentsToInstallCalculated = false; } QHash<QString, QPair<Component*, Component*> > &PackageManagerCorePrivate::componentsToReplace(RunMode mode) @@ -299,7 +299,6 @@ QHash<QString, QPair<Component*, Component*> > &PackageManagerCorePrivate::compo void PackageManagerCorePrivate::clearComponentsToInstall() { - m_componentsToInstallCalculated = false; m_visitedComponents.clear(); m_toInstallComponentIds.clear(); m_missingDependenciesReasons.clear(); @@ -1967,7 +1966,7 @@ void PackageManagerCorePrivate::resetComponentsToUserCheckedState() return; foreach (Component *component, m_coreCheckedHash.keys()) - component->setCheckState(m_coreCheckedHash.value(component)); + component->setCheckState(m_coreCheckedHash.value(component)); m_coreCheckedHash.clear(); m_componentsToInstallCalculated = false; diff --git a/installerbuilder/libinstaller/packagemanagergui.cpp b/installerbuilder/libinstaller/packagemanagergui.cpp index de9d8c050..8695a49ed 100644 --- a/installerbuilder/libinstaller/packagemanagergui.cpp +++ b/installerbuilder/libinstaller/packagemanagergui.cpp @@ -1120,12 +1120,12 @@ void ComponentSelectionPage::entering() setModified(isComplete()); } -int ComponentSelectionPage::nextId() const +void ComponentSelectionPage::showEvent(QShowEvent *event) { // remove once we deprecate isSelected, setSelected etc... - const int next = PackageManagerPage::nextId(); - packageManagerCore()->resetComponentsToUserCheckedState(); - return next; + if (!event->spontaneous()) + packageManagerCore()->resetComponentsToUserCheckedState(); + QWizardPage::showEvent(event); } void ComponentSelectionPage::selectAll() diff --git a/installerbuilder/libinstaller/packagemanagergui.h b/installerbuilder/libinstaller/packagemanagergui.h index 728da5c93..37a5ee7e8 100644 --- a/installerbuilder/libinstaller/packagemanagergui.h +++ b/installerbuilder/libinstaller/packagemanagergui.h @@ -234,7 +234,7 @@ public: protected: void entering(); - int nextId() const; + void showEvent(QShowEvent *event); private Q_SLOTS: void setModified(bool modified); |