Commit a874dc23 authored by Eike Ziller's avatar Eike Ziller

Preferences: Sort categories from providers into list of categories

Designer options were always coming last because that uses an options
provider instead of option pages directly.

Change-Id: I2c02ce7d2ff122beb5d563a9c9ac263bdc71f62b
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 8261b98d
......@@ -33,6 +33,7 @@
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/fancylineedit.h>
#include <utils/qtcassert.h>
......@@ -64,7 +65,6 @@ namespace Internal {
static QPointer<SettingsDialog> m_instance = 0;
// Helpers to sort by category. id
bool optionsPageLessThan(const IOptionsPage *p1, const IOptionsPage *p2)
{
if (p1->category() != p2->category())
......@@ -212,6 +212,9 @@ void CategoryModel::setPages(const QList<IOptionsPage*> &pages,
category->providers.append(provider);
}
Utils::sort(m_categories, [](const Category *c1, const Category *c2) {
return c1->id.alphabeticallyBefore(c2->id);
});
endResetModel();
}
......
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