Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
627a5e0b
Verified
Commit
627a5e0b
authored
Jun 25, 2021
by
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
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
src/configuredialog/configuresecuritypage.cpp
View file @
627a5e0b
...
...
@@ -21,9 +21,11 @@ using namespace PimCommon::ConfigureImmutableWidgetUtils;
#include
<QGpgME/CryptoConfig>
#include
<QGpgME/Protocol>
#include
"kcmutils_version.h"
#include
"kmail_debug.h"
#include
<KLocalizedString>
#include
<KMessageBox>
#include
<KPluginMetaData>
#include
<QButtonGroup>
#include
<QDBusConnection>
...
...
@@ -370,7 +372,15 @@ void SecurityPage::WarningTab::slotReenableAllWarningsClicked()
void
SecurityPage
::
WarningTab
::
slotConfigureGnupg
()
{
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
)
{
auto
info
=
new
QLabel
(
i18n
(
"The module is missing. Please verify your installation. This module is provided by Kleopatra."
),
this
);
QFont
font
=
info
->
font
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment