diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-05-15 10:51:37 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-05-26 08:38:42 +0300 |
commit | 0fcfdebf88372d527008ff0a080bf0f9eb493c9a (patch) | |
tree | dd4daaec97ff27ea00d57122d41ab4823643f456 /src/libs/installer/component.cpp | |
parent | 298fd64d3ddbe6de3607b51c4b71b221de07ce2a (diff) |
Add new no-default-installations option
This option can be used both from CLI and from GUI. Option will
overwrite Default true in component.xml, which means that in GUI the
components are not selected by default, and in CLI the components are
not installed unless those are given as argument to install -command.
Task-number:QTIFW-1630
Change-Id: I5dc16b14fc136f421980a55bb5fc6a74213309dc
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r-- | src/libs/installer/component.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 60ec9ae9f..389580e7c 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -305,7 +305,12 @@ void Component::loadDataFromPackage(const Package &package) setValue(scName, package.data(scName).toString()); setValue(scDisplayName, package.data(scDisplayName).toString()); setValue(scDescription, package.data(scDescription).toString()); - setValue(scDefault, package.data(scDefault).toString()); + + QString isDefault = package.data(scDefault, scFalse).toString().toLower(); + if (PackageManagerCore::noDefaultInstallation()) + isDefault = scFalse; + setValue(scDefault, isDefault); + setValue(scAutoDependOn, package.data(scAutoDependOn).toString()); setValue(scCompressedSize, package.data(scCompressedSize).toString()); setValue(scUncompressedSize, package.data(scUncompressedSize).toString()); |