Fix unnecessary component calculate in silentUpdate

If there are no updates available, no need to calculate components to
install

Change-Id: I95068ef0e062f1745cbe10138407e658befb2c5b
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
This commit is contained in:
Katja Marttila 2017-05-02 13:21:53 +03:00
parent 4ea0d10d72
commit 535a54337e

View File

@ -1805,6 +1805,9 @@ void PackageManagerCore::updateComponentsSilently()
const QList<QInstaller::Component*> componentList = components(
ComponentType::Root | ComponentType::Descendants);
if (componentList.count() == 0) {
qDebug() << "No updates available.";
} else {
foreach (Component *comp, componentList) {
comp->setCheckState(Qt::Checked);
}
@ -1817,6 +1820,7 @@ void PackageManagerCore::updateComponentsSilently()
else {
qDebug() << htmlOutput;
}
}
}
/*!