Commit 7cac939c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Move plugins in subdirectory. So we don't need to open all plugins

parent be848d04
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.13.54")
set(PIM_VERSION "5.13.55")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -76,9 +76,7 @@ private:
void PluginEditorManagerPrivate::initializePlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("KMailEditor/Plugin"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail/plugineditor"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(configGroupName(), configPrefixSettingKey());
......
......@@ -88,9 +88,7 @@ QVector<PimCommon::PluginUtilData> PluginEditorCheckBeforeSendManagerPrivate::pl
void PluginEditorCheckBeforeSendManagerPrivate::initializePlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("KMailEditor/PluginCheckBeforeSend"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail/plugincheckbeforesend"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(configGroupName(), configPrefixSettingKey());
......
......@@ -88,9 +88,7 @@ QVector<PimCommon::PluginUtilData> PluginEditorConvertTextManagerPrivate::plugin
void PluginEditorConvertTextManagerPrivate::initializePlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("KMailEditor/PluginEditorConvertText"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail/plugineditorconverttext"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(configGroupName(), configPrefixSettingKey());
......
......@@ -89,9 +89,7 @@ QVector<PimCommon::PluginUtilData> PluginEditorGrammarManagerPrivate::pluginsDat
void PluginEditorGrammarManagerPrivate::initializePlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("KMailEditor/PluginEditorGrammar"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail/plugineditorgrammar"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(configGroupName(), configPrefixSettingKey());
......
......@@ -88,9 +88,7 @@ QVector<PimCommon::PluginUtilData> PluginEditorInitManagerPrivate::pluginsDataLi
void PluginEditorInitManagerPrivate::initializePlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("KMailEditor/PluginEditorInit"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kmail/plugineditorinit"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(configGroupName(), configPrefixSettingKey());
......
......@@ -88,10 +88,7 @@ QString HeaderStylePluginManagerPrivate::configPrefixSettingKey() const
void HeaderStylePluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins
= KPluginLoader::findPlugins(QStringLiteral("messageviewer"), [](
const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("MessageViewerHeaderStyle/Plugin"));
});
= KPluginLoader::findPlugins(QStringLiteral("messageviewer/headerstyle"));
QVectorIterator<KPluginMetaData> i(plugins);
i.toBack();
......
......@@ -87,10 +87,7 @@ QString MessageViewerConfigureSettingsPluginManagerPrivate::configPrefixSettingK
void MessageViewerConfigureSettingsPluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins
= KPluginLoader::findPlugins(QStringLiteral("messageviewer"), [](
const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("MessageViewerConfigureSettingsPlugin/Plugin"));
});
= KPluginLoader::findPlugins(QStringLiteral("messageviewer/configuresettings"));
QVectorIterator<KPluginMetaData> i(plugins);
i.toBack();
......
......@@ -9,7 +9,7 @@ kconfig_add_kcfg_files(messageviewer_defaultgrantleeheaderstyleplugin_SRCS
)
kcoreaddons_add_plugin(messageviewer_defaultgrantleeheaderstyleplugin JSON messageviewer_defaultgrantleeheaderstyleplugin.json SOURCES
${messageviewer_defaultgrantleeheaderstyleplugin_SRCS} INSTALL_NAMESPACE messageviewer)
${messageviewer_defaultgrantleeheaderstyleplugin_SRCS} INSTALL_NAMESPACE messageviewer/headerstyle)
target_link_libraries(messageviewer_defaultgrantleeheaderstyleplugin
KF5::MessageViewer
......
......@@ -102,10 +102,7 @@ bool ViewerPluginManagerPrivate::initializePluginList()
// We need common plugin to avoid to duplicate code between akregator/kmail
plugins
+= KPluginLoader::findPlugins(QStringLiteral("messageviewer"), [](
const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("MessageViewer/ViewerCommonPlugin"));
});
+= KPluginLoader::findPlugins(QStringLiteral("messageviewer/viewercommonplugin"));
const QPair<QStringList, QStringList> pair = PimCommon::PluginUtil::loadPluginSetting(
configGroupName(), configPrefixSettingKey());
......
......@@ -90,9 +90,7 @@ QVector<PimCommon::PluginUtilData> NetworkUrlInterceptorPluginManagerPrivate::pl
void NetworkUrlInterceptorPluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("webengineviewer"), [](const KPluginMetaData &md) {
return md.serviceTypes().contains(QLatin1String("WebEngineViewer/UrlInterceptor"));
});
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("webengineviewer/urlinterceptor"));
QVectorIterator<KPluginMetaData> i(plugins);
i.toBack();
......
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