Don't save the enabled state for a provider if that provider isn't logged in. The enabled state would always get set to false in this case since the checkbox is disabled in the UI, regardless of its actual state.

This commit is contained in:
David Sansome 2011-12-01 14:30:36 +00:00
parent 3beb216d97
commit 75f2550c31
1 changed files with 5 additions and 2 deletions

View File

@ -136,8 +136,11 @@ void GlobalSearchSettingsPage::Save() {
provider_order << provider->id();
s.setValue("enabled_" + provider->id(),
item->data(0, Qt::CheckStateRole).toInt() == Qt::Checked);
// Only save the enabled state for this provider if it's logged in.
if (item->flags() & Qt::ItemIsUserCheckable) {
s.setValue("enabled_" + provider->id(),
item->data(0, Qt::CheckStateRole).toInt() == Qt::Checked);
}
}
s.setValue("provider_order", provider_order);