mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-05-13 21:39:33 +00:00
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:
parent
4ea0d10d72
commit
535a54337e
@ -1805,17 +1805,21 @@ void PackageManagerCore::updateComponentsSilently()
|
||||
const QList<QInstaller::Component*> componentList = components(
|
||||
ComponentType::Root | ComponentType::Descendants);
|
||||
|
||||
foreach (Component *comp, componentList) {
|
||||
comp->setCheckState(Qt::Checked);
|
||||
}
|
||||
QString htmlOutput;
|
||||
bool componentsOk = calculateComponents(&htmlOutput);
|
||||
if (componentsOk) {
|
||||
if (runPackageUpdater())
|
||||
qDebug() << "Components updated successfully.";
|
||||
}
|
||||
else {
|
||||
qDebug() << htmlOutput;
|
||||
if (componentList.count() == 0) {
|
||||
qDebug() << "No updates available.";
|
||||
} else {
|
||||
foreach (Component *comp, componentList) {
|
||||
comp->setCheckState(Qt::Checked);
|
||||
}
|
||||
QString htmlOutput;
|
||||
bool componentsOk = calculateComponents(&htmlOutput);
|
||||
if (componentsOk) {
|
||||
if (runPackageUpdater())
|
||||
qDebug() << "Components updated successfully.";
|
||||
}
|
||||
else {
|
||||
qDebug() << htmlOutput;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user