Commit a8b61350 authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Nate Graham
Browse files

lookandfeel: Add missing check if list of files is empty

BUG: 439797


(cherry picked from commit d168d2a5)
parent c4ae3c2d
......@@ -123,7 +123,9 @@ void KCMLookandFeel::knsEntryChanged(KNSCore::EntryWrapper *wrapper)
if (entry.status() == KNS3::Entry::Deleted && !entry.uninstalledFiles().isEmpty()) {
removeItemFromModel();
} else if (entry.status() == KNS3::Entry::Installed && !entry.installedFiles().isEmpty()) {
removeItemFromModel(); // In case we updated it we don't want to have it in twice
if (!entry.uninstalledFiles().isEmpty()) {
removeItemFromModel(); // In case we updated it we don't want to have it in twice
}
KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel"));
pkg.setPath(entry.installedFiles().constFirst());
addKPackageToModel(pkg);
......
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