Changeset View
Changeset View
Standalone View
Standalone View
shell/uicontroller.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | #include "settings/languagepreferences.h" | 56 | #include "settings/languagepreferences.h" | ||
57 | #include "settings/environmentpreferences.h" | 57 | #include "settings/environmentpreferences.h" | ||
58 | #include "settings/pluginpreferences.h" | 58 | #include "settings/pluginpreferences.h" | ||
59 | #include "settings/projectpreferences.h" | 59 | #include "settings/projectpreferences.h" | ||
60 | #include "settings/sourceformattersettings.h" | 60 | #include "settings/sourceformattersettings.h" | ||
61 | #include "settings/uipreferences.h" | 61 | #include "settings/uipreferences.h" | ||
62 | #include "settings/templateconfig.h" | 62 | #include "settings/templateconfig.h" | ||
63 | #include "settings/analyzerspreferences.h" | 63 | #include "settings/analyzerspreferences.h" | ||
64 | #include "settings/documentationpreferences.h" | ||||
64 | 65 | | |||
65 | namespace KDevelop { | 66 | namespace KDevelop { | ||
66 | 67 | | |||
67 | class UiControllerPrivate { | 68 | class UiControllerPrivate { | ||
68 | public: | 69 | public: | ||
69 | UiControllerPrivate(UiController *controller) | 70 | UiControllerPrivate(UiController *controller) | ||
70 | : areasRestored(false), m_controller(controller) | 71 | : areasRestored(false), m_controller(controller) | ||
71 | { | 72 | { | ||
▲ Show 20 Lines • Show All 420 Lines • ▼ Show 20 Line(s) | |||||
492 | 493 | | |||
493 | void UiController::showSettingsDialog() | 494 | void UiController::showSettingsDialog() | ||
494 | { | 495 | { | ||
495 | auto parent = activeMainWindow(); | 496 | auto parent = activeMainWindow(); | ||
496 | 497 | | |||
497 | auto editorConfigPage = new EditorConfigPage(parent); | 498 | auto editorConfigPage = new EditorConfigPage(parent); | ||
498 | auto languageConfigPage = new LanguagePreferences(parent); | 499 | auto languageConfigPage = new LanguagePreferences(parent); | ||
499 | auto analyzersPreferences = new AnalyzersPreferences(parent); | 500 | auto analyzersPreferences = new AnalyzersPreferences(parent); | ||
501 | auto documentationPreferences = new DocumentationPreferences(parent); | ||||
500 | 502 | | |||
501 | auto configPages = QVector<KDevelop::ConfigPage*> { | 503 | auto configPages = QVector<KDevelop::ConfigPage*> { | ||
502 | new UiPreferences(parent), | 504 | new UiPreferences(parent), | ||
503 | new PluginPreferences(parent), | 505 | new PluginPreferences(parent), | ||
504 | new SourceFormatterSettings(parent), | 506 | new SourceFormatterSettings(parent), | ||
505 | new ProjectPreferences(parent), | 507 | new ProjectPreferences(parent), | ||
506 | new EnvironmentPreferences(QString(), parent), | 508 | new EnvironmentPreferences(QString(), parent), | ||
507 | new TemplateConfig(parent), | 509 | new TemplateConfig(parent), | ||
508 | editorConfigPage | 510 | editorConfigPage | ||
509 | }; | 511 | }; | ||
510 | 512 | | |||
511 | ConfigDialog cfgDlg(configPages, parent); | 513 | ConfigDialog cfgDlg(configPages, parent); | ||
512 | 514 | | |||
513 | auto addPluginPages = [&](IPlugin* plugin) { | 515 | auto addPluginPages = [&](IPlugin* plugin) { | ||
514 | for (int i = 0, numPages = plugin->configPages(); i < numPages; ++i) { | 516 | for (int i = 0, numPages = plugin->configPages(); i < numPages; ++i) { | ||
515 | auto page = plugin->configPage(i, &cfgDlg); | 517 | auto page = plugin->configPage(i, &cfgDlg); | ||
516 | if (!page) | 518 | if (!page) | ||
517 | continue; | 519 | continue; | ||
518 | 520 | | |||
519 | if (page->configPageType() == ConfigPage::LanguageConfigPage) { | 521 | if (page->configPageType() == ConfigPage::LanguageConfigPage) { | ||
520 | cfgDlg.addSubConfigPage(languageConfigPage, page); | 522 | cfgDlg.addSubConfigPage(languageConfigPage, page); | ||
521 | } else if (page->configPageType() == ConfigPage::AnalyzerConfigPage) { | 523 | } else if (page->configPageType() == ConfigPage::AnalyzerConfigPage) { | ||
522 | cfgDlg.addSubConfigPage(analyzersPreferences, page); | 524 | cfgDlg.addSubConfigPage(analyzersPreferences, page); | ||
525 | } else if (page->configPageType() == ConfigPage::DocumentationConfigPage) { | ||||
526 | cfgDlg.addSubConfigPage(documentationPreferences, page); | ||||
523 | } else { | 527 | } else { | ||
524 | // insert them before the editor config page | 528 | // insert them before the editor config page | ||
525 | cfgDlg.addConfigPage(page, editorConfigPage); | 529 | cfgDlg.addConfigPage(page, editorConfigPage); | ||
526 | } | 530 | } | ||
527 | } | 531 | } | ||
528 | }; | 532 | }; | ||
529 | 533 | | |||
530 | cfgDlg.addConfigPage(analyzersPreferences, configPages[5]); | 534 | cfgDlg.addConfigPage(documentationPreferences, configPages[5]); | ||
535 | cfgDlg.addConfigPage(analyzersPreferences, documentationPreferences); | ||||
531 | 536 | | |||
532 | cfgDlg.addConfigPage(languageConfigPage, analyzersPreferences); | 537 | cfgDlg.addConfigPage(languageConfigPage, analyzersPreferences); | ||
533 | cfgDlg.addSubConfigPage(languageConfigPage, new BGPreferences(parent)); | 538 | cfgDlg.addSubConfigPage(languageConfigPage, new BGPreferences(parent)); | ||
534 | 539 | | |||
535 | foreach (IPlugin* plugin, ICore::self()->pluginController()->loadedPlugins()) { | 540 | foreach (IPlugin* plugin, ICore::self()->pluginController()->loadedPlugins()) { | ||
536 | addPluginPages(plugin); | 541 | addPluginPages(plugin); | ||
537 | } | 542 | } | ||
538 | 543 | | |||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |