Commit 9ae35f79 authored by Kai Koehne's avatar Kai Koehne

Task Pane: Sort list of filters alphabetically

Change-Id: Ife88fd800da42d45c859a5637bfa4259f898add2
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 55ebeddb
......@@ -464,15 +464,17 @@ void TaskWindow::updateCategoriesMenu()
const QStringList filteredCategories = d->m_filter->filteredCategories();
foreach (const QString &categoryId, d->m_model->categoryIds()) {
const QString categoryName = d->m_model->categoryDisplayName(categoryId);
QMap<QString, QString> nameToIds;
foreach (const QString &categoryId, d->m_model->categoryIds())
nameToIds.insert(d->m_model->categoryDisplayName(categoryId), categoryId);
foreach (const QString &displayName, nameToIds.keys()) {
const QString categoryId = nameToIds.value(displayName);
QAction *action = new QAction(d->m_categoriesMenu);
action->setCheckable(true);
action->setText(categoryName);
action->setText(displayName);
action->setData(categoryId);
action->setChecked(!filteredCategories.contains(categoryId));
d->m_categoriesMenu->addAction(action);
}
}
......
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