Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/settings/pluginpreferences.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 62 | { | |||
---|---|---|---|---|---|
63 | QString category = info.category(); | 63 | QString category = info.category(); | ||
64 | if (!categories.contains(category)) { | 64 | if (!categories.contains(category)) { | ||
65 | if (!category.isEmpty()) { | 65 | if (!category.isEmpty()) { | ||
66 | qCWarning(SHELL) << "unknown category for plugin" << info.name() << ":" << info.category(); | 66 | qCWarning(SHELL) << "unknown category for plugin" << info.name() << ":" << info.category(); | ||
67 | } | 67 | } | ||
68 | category = QStringLiteral("Other"); | 68 | category = QStringLiteral("Other"); | ||
69 | } | 69 | } | ||
70 | KPluginInfo kpi(info); | 70 | KPluginInfo kpi(info); | ||
71 | kpi.setPluginEnabled(Core::self()->pluginControllerInternal()->isEnabled(info)); | | |||
72 | plugins[category] << kpi; | 71 | plugins[category] << kpi; | ||
73 | } else | 72 | } else | ||
74 | qCDebug(SHELL) << "skipping..." << info.pluginId() << info.value(QStringLiteral("X-KDevelop-Category")) << loadMode; | 73 | qCDebug(SHELL) << "skipping..." << info.pluginId() << info.value(QStringLiteral("X-KDevelop-Category")) << loadMode; | ||
75 | } | 74 | } | ||
76 | 75 | | |||
77 | for (auto it = plugins.constBegin(), end = plugins.constEnd(); it != end; ++it) { | 76 | for (auto it = plugins.constBegin(), end = plugins.constEnd(); it != end; ++it) { | ||
78 | selector->addPlugins(it.value(), KPluginSelector::ReadConfigFile, | 77 | selector->addPlugins(it.value(), KPluginSelector::ReadConfigFile, | ||
79 | categories.value(it.key()), | 78 | categories.value(it.key()), | ||
80 | // no filter by category key, we did it ourselves above & will not work with "Other" | 79 | // no filter by category key, we did it ourselves above & will not work with "Other" | ||
81 | QString(), | 80 | QString(), | ||
82 | Core::self()->activeSession()->config()); | 81 | Core::self()->activeSession()->config()); | ||
83 | } | 82 | } | ||
84 | connect(selector, &KPluginSelector::changed, this, &PluginPreferences::changed); | 83 | connect(selector, &KPluginSelector::changed, this, &PluginPreferences::changed); | ||
85 | selector->load(); | | |||
86 | } | 84 | } | ||
87 | 85 | | |||
88 | void PluginPreferences::defaults() | 86 | void PluginPreferences::defaults() | ||
89 | { | 87 | { | ||
90 | Core::self()->pluginControllerInternal()->resetToDefaults(); | 88 | Core::self()->pluginControllerInternal()->resetToDefaults(); | ||
91 | selector->load(); | 89 | selector->load(); | ||
92 | } | 90 | } | ||
93 | 91 | | |||
Show All 17 Lines |