Verified Commit 627a5e0b authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Looad Kleopatra KCM using KPluginMetaData

Requires kleopatra@3ccc25fd

Task: https://phabricator.kde.org/T14501
parent 5dd35807
Pipeline #67548 passed with stage
in 22 minutes and 30 seconds
...@@ -21,9 +21,11 @@ using namespace PimCommon::ConfigureImmutableWidgetUtils; ...@@ -21,9 +21,11 @@ using namespace PimCommon::ConfigureImmutableWidgetUtils;
#include <QGpgME/CryptoConfig> #include <QGpgME/CryptoConfig>
#include <QGpgME/Protocol> #include <QGpgME/Protocol>
#include "kcmutils_version.h"
#include "kmail_debug.h" #include "kmail_debug.h"
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox> #include <KMessageBox>
#include <KPluginMetaData>
#include <QButtonGroup> #include <QButtonGroup>
#include <QDBusConnection> #include <QDBusConnection>
...@@ -370,7 +372,15 @@ void SecurityPage::WarningTab::slotReenableAllWarningsClicked() ...@@ -370,7 +372,15 @@ void SecurityPage::WarningTab::slotReenableAllWarningsClicked()
void SecurityPage::WarningTab::slotConfigureGnupg() void SecurityPage::WarningTab::slotConfigureGnupg()
{ {
QPointer<GpgSettingsDialog> dlg(new GpgSettingsDialog(this)); QPointer<GpgSettingsDialog> dlg(new GpgSettingsDialog(this));
KPageWidgetItem *page = dlg->addModule(QStringLiteral("kleopatra_config_gnupgsystem")); KPageWidgetItem *page = nullptr;
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 84, 0)
const auto plugin = KPluginMetaData::findPluginById(QStringLiteral("pim/kcms/kleopatra"), QStringLiteral("kleopatra_config_gnupgsystem"));
if (plugin.isValid()) {
page = dlg->addModule(plugin);
}
#else
page = dlg->addModule(QStringLiteral("kleopatra_config_gnupgsystem"));
#endif
if (!page) { if (!page) {
auto info = new QLabel(i18n("The module is missing. Please verify your installation. This module is provided by Kleopatra."), this); auto info = new QLabel(i18n("The module is missing. Please verify your installation. This module is provided by Kleopatra."), this);
QFont font = info->font(); QFont font = info->font();
......
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