diff options
author | kh1 <karsten.heimrich@nokia.com> | 2011-08-24 14:47:42 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-08-24 14:57:25 +0200 |
commit | 849b03f9ecd403be5a3150eb52fefa79a7eced97 (patch) | |
tree | eff23f99231f1b7e04c28f92d8758d1fe937931c /installerbuilder | |
parent | d12a1f929cbe6fe125d3225045b3ab2174ecf607 (diff) |
Revert parts of the former changes.
Now reset the core checked list in show event, as this is
not called that frequently as nextId(). Solves the problem
of always recalculating the components to install.
Change-Id: I282d25236441c6a91c833867ce65aa351dcfcc67
Reviewed-on: http://codereview.qt.nokia.com/3503
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder')
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); |