Commit a89ad036 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Install plugin in pim<version>

parent 360b959f
Pipeline #186790 passed with stage
in 8 minutes and 46 seconds
......@@ -456,22 +456,22 @@ target_sources(kcm_kmail_static PRIVATE kcm_kmail.cpp)
pim_target_precompile_headers(kcm_kmail_static PUBLIC ../kmail_pch.h)
target_link_libraries(kcm_kmail_static kmailprivate KF5::KCMUtils KF5::Completion KF5::I18n KF5::TextWidgets)
kcoreaddons_add_plugin(kcm_kmail_accounts SOURCES configuredialog/kcm_kmail_accounts.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_accounts SOURCES configuredialog/kcm_kmail_accounts.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_accounts kcm_kmail_static)
kcoreaddons_add_plugin(kcm_kmail_appearance SOURCES configuredialog/kcm_kmail_appearance.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_appearance SOURCES configuredialog/kcm_kmail_appearance.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_appearance kcm_kmail_static)
kcoreaddons_add_plugin(kcm_kmail_composer SOURCES configuredialog/kcm_kmail_composer.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_composer SOURCES configuredialog/kcm_kmail_composer.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_composer kcm_kmail_static)
kcoreaddons_add_plugin(kcm_kmail_misc SOURCES configuredialog/kcm_kmail_misc.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_misc SOURCES configuredialog/kcm_kmail_misc.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_misc kcm_kmail_static)
kcoreaddons_add_plugin(kcm_kmail_plugins SOURCES configuredialog/kcm_kmail_plugins.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_plugins SOURCES configuredialog/kcm_kmail_plugins.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_plugins kcm_kmail_static)
kcoreaddons_add_plugin(kcm_kmail_security SOURCES configuredialog/kcm_kmail_security.cpp INSTALL_NAMESPACE "pim/kcms/kmail")
kcoreaddons_add_plugin(kcm_kmail_security SOURCES configuredialog/kcm_kmail_security.cpp INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/kcms/kmail")
target_link_libraries(kcm_kmail_security kcm_kmail_static)
########### kmailpart ###############
......
......@@ -25,7 +25,8 @@ ConfigureDialog::ConfigureDialog(QWidget *parent, bool modal)
setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Cancel | QDialogButtonBox::Apply
| QDialogButtonBox::Reset);
setModal(modal);
const QVector<KPluginMetaData> availablePlugins = KPluginMetaData::findPlugins(QStringLiteral("pim/kcms/kmail"));
const QVector<KPluginMetaData> availablePlugins =
KPluginMetaData::findPlugins(QStringLiteral("pim" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/kcms/kmail"));
for (const KPluginMetaData &metaData : availablePlugins) {
addModule(metaData);
}
......
......@@ -372,7 +372,8 @@ void SecurityPageWarningTab::slotConfigureGnupg()
QPointer<GpgSettingsDialog> dlg(new GpgSettingsDialog(this));
dlg->setWindowTitle(i18nc("@title:window", "GnuPG Settings"));
KPageWidgetItem *page = nullptr;
const auto plugin = KPluginMetaData::findPluginById(QStringLiteral("pim/kcms/kleopatra"), QStringLiteral("kleopatra_config_gnupgsystem"));
const auto plugin = KPluginMetaData::findPluginById((QStringLiteral("pim" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/kcms/kleopatra")),
QStringLiteral("kleopatra_config_gnupgsystem"));
if (plugin.isValid()) {
page = dlg->addModule(plugin);
}
......
......@@ -13,7 +13,7 @@ ecm_qt_declare_logging_category(kontact_kmail_plugins_interface_common_SRCS HEAD
set(kontact_kmail_plugins_interface_SRCS)
qt_add_dbus_interfaces(kontact_kmail_plugins_interface_SRCS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml)
configure_file(kmailplugin.json.cmake ${CMAKE_CURRENT_BINARY_DIR}/kmailplugin.json )
add_library(kontact_kmailplugin MODULE)
target_sources(kontact_kmailplugin PRIVATE kmail_plugin.cpp summarywidget.cpp kmail_plugin.h summarywidget.h ${kontact_kmail_plugins_interface_SRCS} ${kontact_kmail_plugins_interface_common_SRCS})
pim_target_precompile_headers(kontact_kmailplugin PUBLIC ../../../kmail_pch.h)
......@@ -35,4 +35,4 @@ target_link_libraries(kcmkmailsummary KF5::Mime KF5::PimCommonAkonadi Qt${QT_MA
install(TARGETS kontact_kmailplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kontact${QT_MAJOR_VERSION})
install(TARGETS kcmkmailsummary DESTINATION ${KDE_INSTALL_PLUGINDIR}/pim/kcms/summary/)
install(TARGETS kcmkmailsummary DESTINATION ${KDE_INSTALL_PLUGINDIR}/pim${QT_MAJOR_VERSION}/kcms/summary/)
......@@ -110,7 +110,7 @@
"Version": "0.1",
"Website": "https://kontact.kde.org/components/kmail/"
},
"X-KDE-ConfigModuleNamespace": "pim/kcms/kmail/",
"X-KDE-ConfigModuleNamespace": "pim@QT_MAJOR_VERSION@/kcms/kmail/",
"X-KDE-KontactPartExecutableName": "kmail",
"X-KDE-KontactPartLibraryName": "kmailpart",
"X-KDE-KontactPartLoadOnStart": true,
......
......@@ -6,6 +6,7 @@ set(kontact_summaryplugin_PART_SRCS summaryview_plugin.cpp summaryview_part.cpp
summaryview_plugin.h summaryview_part.h dropwidget.h)
qt_add_dbus_interfaces(kontact_summaryplugin_PART_SRCS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml)
configure_file(summaryplugin.json.cmake ${CMAKE_CURRENT_BINARY_DIR}/summaryplugin.json)
add_library(kontact_summaryplugin MODULE ${kontact_summaryplugin_PART_SRCS})
pim_target_precompile_headers(kontact_summaryplugin PUBLIC ../../../kmail_pch.h)
......@@ -23,6 +24,6 @@ target_link_libraries(kcmkontactsummary KF5::I18n Qt${QT_MAJOR_VERSION}::Widgets
########### install files ###############
install(TARGETS kontact_summaryplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kontact${QT_MAJOR_VERSION})
install(TARGETS kcmkontactsummary DESTINATION ${KDE_INSTALL_PLUGINDIR}/pim/kcms/summary)
install(TARGETS kcmkontactsummary DESTINATION ${KDE_INSTALL_PLUGINDIR}/pim${QT_MAJOR_VERSION}/kcms/summary)
install(FILES kontactsummary_part.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/kontactsummary)
......@@ -109,7 +109,7 @@
],
"Version": "0.1"
},
"X-KDE-ConfigModuleNamespace": "pim/kcms/summary/",
"X-KDE-ConfigModuleNamespace": "pim@QT_MAJOR_VERSION@/kcms/summary/",
"X-KDE-KontactPluginVersion": 10,
"X-KDE-Weight": "100"
}
......@@ -405,7 +405,7 @@ void SummaryViewPart::slotConfigure()
dlg->setObjectName(QStringLiteral("ConfigDialog"));
dlg->setModal(true);
connect(dlg.data(), &KCMultiDialog::configCommitted, this, &SummaryViewPart::updateWidgets);
const auto metaDataList = KPluginMetaData::findPlugins(QStringLiteral("pim/kcms/summary/"));
const auto metaDataList = KPluginMetaData::findPlugins(QStringLiteral("pim" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/kcms/summary/"));
for (const auto &metaData : metaDataList) {
dlg->addModule(metaData);
}
......
Supports Markdown
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