Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akregator
Commits
809df6cb
Verified
Commit
809df6cb
authored
Jun 16, 2021
by
Alexander Lohnau
💬
Browse files
Use KPluginMetaData to load KCMs in KCMultiDialog
Task:
https://phabricator.kde.org/T14501
parent
9f5e65a8
Pipeline
#66168
passed with stage
in 8 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/akregator_part.cpp
View file @
809df6cb
...
...
@@ -9,6 +9,7 @@
#include "akregator_part.h"
#include "akregator_debug.h"
#include "kcmutils_version.h"
#include <MessageViewer/MessageViewerSettings>
...
...
@@ -38,6 +39,8 @@
#include <KConfig>
#include <KMessageBox>
#include <KNotifyConfigWidget>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <PimCommon/BroadcastStatus>
#include <QFileDialog>
#include <kio/filecopyjob.h>
...
...
@@ -607,16 +610,14 @@ void Part::showOptions()
connect
(
m_dialog
,
qOverload
<>
(
&
KCMultiDialog
::
configCommitted
),
TrayIcon
::
getInstance
(),
&
TrayIcon
::
settingsChanged
);
}
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_general"
));
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_appearance"
));
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_archive"
));
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_browser"
));
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_advanced"
));
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_plugins"
));
#ifdef WITH_KUSERFEEDBACK
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_userfeedback"
));
const
QVector
<
KPluginMetaData
>
availablePlugins
=
KPluginLoader
::
findPlugins
(
QStringLiteral
(
"pim/kcms/akregator"
));
for
(
const
KPluginMetaData
&
metaData
:
availablePlugins
)
{
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 84, 0)
m_dialog
->
addModule
(
metaData
);
#else
m_dialog
->
addModule
(
metaData
.
pluginId
());
#endif
m_dialog
->
addModule
(
QStringLiteral
(
"akregator_config_security"
));
}
}
m_dialog
->
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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