From 0fcfdebf88372d527008ff0a080bf0f9eb493c9a Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Fri, 15 May 2020 10:51:37 +0300 Subject: 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 --- src/libs/installer/component.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libs/installer/component.cpp') 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()); -- cgit v1.2.3