summaryrefslogtreecommitdiffstats
path: root/installerbuilder/installerbase/installerbasecommons.cpp
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@nokia.com>2011-07-20 16:16:52 +0200
committerMaurice Kalinowski <maurice.kalinowski@nokia.com>2011-07-20 16:16:52 +0200
commit9aa3be4b70a79cce3bf056e64661f3227c71634d (patch)
treee8050612197bb26000b62544be5418d13058ef6d /installerbuilder/installerbase/installerbasecommons.cpp
parenta2de8dab3231c52c946d3b93fc7d49f753dc27e4 (diff)
omit license page for no agreement
if there is no license to agree, the license page can be skipped Reviewed-By: Tim Jenssen
Diffstat (limited to 'installerbuilder/installerbase/installerbasecommons.cpp')
-rw-r--r--installerbuilder/installerbase/installerbasecommons.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/installerbuilder/installerbase/installerbasecommons.cpp b/installerbuilder/installerbase/installerbasecommons.cpp
index 81acb420e..81ec5f83e 100644
--- a/installerbuilder/installerbase/installerbasecommons.cpp
+++ b/installerbuilder/installerbase/installerbasecommons.cpp
@@ -336,6 +336,29 @@ void InstallerGui::init()
wizardPageVisibilityChangeRequested(false, PackageManagerCore::ComponentSelection);
}
+int InstallerGui::nextId() const
+{
+ const int next = QWizard::nextId();
+ if (next == PackageManagerCore::LicenseCheck) {
+ PackageManagerCore *const core = packageManagerCore();
+ const int nextNextId = pageIds().value(pageIds().indexOf(next)+ 1, -1);
+ if (!core->isInstaller())
+ return nextNextId;
+
+ QList<Component*> components = core->componentsToInstall(core->runMode());
+ bool foundLicense = false;
+
+ foreach (Component* component, components) {
+ if (!component->licenses().isEmpty()) {
+ foundLicense = true;
+ break;
+ }
+ }
+ return foundLicense ? next : nextNextId;
+ }
+ return next;
+}
+
// -- MaintenanceGui