Fixed disabling tabs in options dialog when category matches search

When the category title matches with the search keyword, we shouldn't
disable any of the tabs in this category. For example the only page in
the Locator category was disabled, because the page itself did not have
'Locator' as keyword.

Reviewed-by: con
This commit is contained in:
Thorbjørn Lindeijer
2010-05-12 16:00:07 +02:00
parent acea722d75
commit b295e82924

View File

@@ -382,6 +382,7 @@ void SettingsDialog::updateEnabledTabs(Category *category, const QString &search
for (int i = 0; i < category->pages.size(); ++i) {
const IOptionsPage *page = category->pages.at(i);
const bool enabled = searchText.isEmpty()
|| page->category().contains(searchText, Qt::CaseInsensitive)
|| page->displayName().contains(searchText, Qt::CaseInsensitive)
|| page->matches(searchText);
category->tabWidget->setTabEnabled(i, enabled);