Commit 14190aea authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Only check for configuration changes when the ones we care about change

BUG: 447939
parent 2c1cfe48
Pipeline #124930 passed with stage
in 1 minute and 8 seconds
......@@ -154,7 +154,12 @@ void ResourcesUpdatesModel::init()
m_offlineUpdates = group.readEntry<bool>("UseOfflineUpdates", false);
KConfigWatcher::Ptr watcher = KConfigWatcher::create(sharedConfig);
connect(watcher.data(), &KConfigWatcher::configChanged, [=]() {
connect(watcher.data(), &KConfigWatcher::configChanged, [this](const KConfigGroup &group, const QByteArrayList &names) {
// Ensure it is for the right file
if (!names.contains("UseOfflineUpdates") || group.name() != "Software") {
return;
}
if (m_offlineUpdates == group.readEntry<bool>("UseOfflineUpdates", false)) {
return;
}
......
Supports Markdown
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