Commit a7e191c5 authored by Bea Lam's avatar Bea Lam

[developermode] Always resolve the developer-mode package before doing an...

[developermode] Always resolve the developer-mode package before doing an install/remove. Contributes to JB#39097

Otherwise, the install/remove finishes prematurely before packages
are actually downloaded/removed, even if the package ID was
resolved previously.
parent e1cc12e2
......@@ -256,12 +256,10 @@ DeveloperModeSettings::setDeveloperMode(bool enabled)
m_packageKitCommand = &DeveloperModeSettings::removePackage;
}
if (m_developerModePackageId.isEmpty()) {
executePackageKitCommand(&DeveloperModeSettings::resolvePackageId, DEVELOPER_MODE_PACKAGE);
} else {
executePackageKitCommand(m_packageKitCommand, m_developerModePackageId);
m_packageKitCommand = nullptr;
}
// Always resolve the developer-mode package before doing an install/remove, even if it was
// previously resolved; otherwise, the install/remove finishes prematurely before packages
// are actually downloaded/removed.
executePackageKitCommand(&DeveloperModeSettings::resolvePackageId, DEVELOPER_MODE_PACKAGE);
emit workerStatusChanged();
}
}
......@@ -490,6 +488,7 @@ void DeveloperModeSettings::transactionPackage(uint, const QString &packageId)
}
m_developerModePackageId = packageId;
if (!m_developerModeEnabled) {
emit developerModeAvailableChanged();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment