Changeset View
Changeset View
Standalone View
Standalone View
kate/katepluginmanager.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 56 | { | |||
---|---|---|---|---|---|
57 | /** | 57 | /** | ||
58 | * get all KTextEditor/Plugins | 58 | * get all KTextEditor/Plugins | ||
59 | */ | 59 | */ | ||
60 | const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("ktexteditor"), [](const KPluginMetaData & md) { | 60 | const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("ktexteditor"), [](const KPluginMetaData & md) { | ||
61 | return md.serviceTypes().contains(QStringLiteral("KTextEditor/Plugin")); | 61 | return md.serviceTypes().contains(QStringLiteral("KTextEditor/Plugin")); | ||
62 | }); | 62 | }); | ||
63 | 63 | | |||
64 | /** | 64 | /** | ||
65 | * move them to our internal data structure | 65 | * move them to our internal data structure, | ||
66 | * activate some plugins per default | 66 | * activate some plugins per default, | ||
67 | * the following list is ordered alphabetically by plugin name (this is not a technical need; just to have some order) | ||||
67 | */ | 68 | */ | ||
68 | QSet<QString> defaultPlugins; | 69 | QSet<QString> defaultPlugins; | ||
70 | | ||||
71 | defaultPlugins.insert(QLatin1String("cuttlefishplugin")); // this comes with package plasma5-sdk but it won't hurt to list it here (activate by right click in the text area) | ||||
72 | #ifndef WIN32 | ||||
73 | defaultPlugins.insert(QLatin1String("katefilebrowserplugin")); // currently works badly on Windows | ||||
74 | #endif | ||||
69 | defaultPlugins.insert (QLatin1String("katefiletreeplugin")); | 75 | defaultPlugins.insert(QLatin1String("katefiletreeplugin")); | ||
70 | defaultPlugins.insert (QLatin1String("tabswitcherplugin")); | 76 | #ifndef WIN32 | ||
77 | defaultPlugins.insert(QLatin1String("katekonsoleplugin")); // currently does not work on Windows at all | ||||
78 | #endif | ||||
71 | defaultPlugins.insert (QLatin1String("kateprojectplugin")); | 79 | defaultPlugins.insert(QLatin1String("kateprojectplugin")); | ||
72 | defaultPlugins.insert (QLatin1String("katesearchplugin")); | 80 | defaultPlugins.insert(QLatin1String("katesearchplugin")); | ||
81 | //defaultPlugins.insert(QLatin1String("ktexteditorpreviewplugin")); // the feature is nice and needed, but in its current state we should not present it by default | ||||
82 | defaultPlugins.insert(QLatin1String("tabswitcherplugin")); | ||||
73 | defaultPlugins.insert (QLatin1String("textfilterplugin")); | 83 | defaultPlugins.insert(QLatin1String("textfilterplugin")); | ||
84 | | ||||
74 | m_pluginList.clear(); | 85 | m_pluginList.clear(); | ||
75 | QVectorIterator<KPluginMetaData> i(plugins); | 86 | QVectorIterator<KPluginMetaData> i(plugins); | ||
76 | QSet<QString> unique; | 87 | QSet<QString> unique; | ||
77 | while (i.hasNext()) { | 88 | while (i.hasNext()) { | ||
78 | KatePluginInfo info; | 89 | KatePluginInfo info; | ||
79 | info.metaData = i.next(); | 90 | info.metaData = i.next(); | ||
80 | 91 | | |||
81 | // only load plugins once, even if found multiple times! | 92 | // only load plugins once, even if found multiple times! | ||
▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines |