diff --git a/kdevplatform/shell/uicontroller.cpp b/kdevplatform/shell/uicontroller.cpp --- a/kdevplatform/shell/uicontroller.cpp +++ b/kdevplatform/shell/uicontroller.cpp @@ -505,13 +505,19 @@ new ProjectPreferences(&cfgDlg), new EnvironmentPreferences(QString(), &cfgDlg), templateConfig, + documentationPreferences, + analyzersPreferences, + runtimesPreferences, + languageConfigPage, editorConfigPage }; for (auto page : configPages) { cfgDlg.appendConfigPage(page); } + cfgDlg.appendSubConfigPage(languageConfigPage, new BGPreferences(&cfgDlg)); + auto addPluginPages = [&](IPlugin* plugin) { for (int i = 0, numPages = plugin->configPages(); i < numPages; ++i) { auto page = plugin->configPage(i, &cfgDlg); @@ -532,14 +538,10 @@ } }; - cfgDlg.insertConfigPage(templateConfig, documentationPreferences); - cfgDlg.insertConfigPage(documentationPreferences, analyzersPreferences); - cfgDlg.insertConfigPage(analyzersPreferences, runtimesPreferences); - - cfgDlg.insertConfigPage(runtimesPreferences, languageConfigPage); - cfgDlg.appendSubConfigPage(languageConfigPage, new BGPreferences(&cfgDlg)); + auto plugins = ICore::self()->pluginController()->loadedPlugins(); + std::sort(plugins.begin(), plugins.end()); - foreach (IPlugin* plugin, ICore::self()->pluginController()->loadedPlugins()) { + foreach (IPlugin* plugin, plugins) { addPluginPages(plugin); }