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
KAddressBook
Commits
f7ed0716
Commit
f7ed0716
authored
Jun 17, 2021
by
Laurent Montel
😁
Browse files
Use K_PLUGIN_CLASS_WITH_JSON directly
parent
6e8c100a
Pipeline
#66247
passed with stage
in 5 minutes and 10 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/configuration/CMakeLists.txt
View file @
f7ed0716
...
...
@@ -24,6 +24,7 @@ target_link_libraries(kaddressbook_config_plugins
KPimAddressbookImportExport
)
kcoreaddons_desktop_to_json
(
kaddressbook_config_plugins kaddressbook_config_plugins.desktop SERVICE_TYPES kcmodule.desktop
)
install
(
FILES kaddressbook_config_plugins.desktop DESTINATION
${
KDE_INSTALL_KSERVICES5DIR
}
)
install
(
TARGETS kaddressbook_config_plugins DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/pim/kcms/kaddressbook
)
...
...
src/configuration/kaddressbook_config_plugins.cpp
View file @
f7ed0716
...
...
@@ -15,7 +15,7 @@
using
namespace
KAddressBook
;
K_PLUGIN_
FACTORY
(
KCMKaddressbookPluginsConfig
Factory
,
registerPlugin
<
KCMKaddressbookPluginsConfig
>
();
)
K_PLUGIN_
CLASS_WITH_JSON
(
KCMKaddressbookPluginsConfig
,
"kaddressbook_config_plugins.json"
)
KCMKaddressbookPluginsConfig
::
KCMKaddressbookPluginsConfig
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
)
...
...
src/configuration/kaddressbook_config_userfeedback.cpp
View file @
f7ed0716
...
...
@@ -16,7 +16,7 @@
using
namespace
KAddressBook
;
K_PLUGIN_
FACTORY
(
KCMKaddressbookUserFeedBackConfig
Factory
,
registerPlugin
<
KCMK
addressbook
U
ser
F
eed
B
ack
Config
>
();
)
K_PLUGIN_
CLASS_WITH_JSON
(
KCMKaddressbookUserFeedBackConfig
,
"k
addressbook
_config_u
ser
f
eed
b
ack
.json"
)
KCMKaddressbookUserFeedBackConfig
::
KCMKaddressbookUserFeedBackConfig
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
)
...
...
src/mainwidget.cpp
View file @
f7ed0716
...
...
@@ -15,6 +15,7 @@
#include "globalcontactmodel.h"
#include "kaddressbook_options.h"
#include "kaddressbookadaptor.h"
#include "kcmutils_version.h"
#include "manageshowcollectionproperties.h"
#include "modelcolumnmanager.h"
#include "printing/printingwizard.h"
...
...
@@ -68,6 +69,8 @@
#include <KContacts/ContactGroup>
#include <KDescendantsProxyModel>
#include <KLocalizedString>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <KSelectionProxyModel>
#include <KToggleAction>
#include <KXMLGUIClient>
...
...
@@ -352,11 +355,14 @@ void MainWidget::configure()
QPointer
<
KCMultiDialog
>
dlg
=
new
KCMultiDialog
(
this
);
dlg
->
addModule
(
QStringLiteral
(
"akonadicontact_actions"
));
dlg
->
addModule
(
QStringLiteral
(
"kcmldap"
));
dlg
->
addModule
(
QStringLiteral
(
"kaddressbook_config_plugins"
));
#ifdef WITH_KUSERFEEDBACK
dlg
->
addModule
(
QStringLiteral
(
"kaddressbook_config_userfeedback"
));
const
QVector
<
KPluginMetaData
>
availablePlugins
=
KPluginLoader
::
findPlugins
(
QStringLiteral
(
"pim/kcms/kaddressbook"
));
for
(
const
KPluginMetaData
&
metaData
:
availablePlugins
)
{
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 84, 0)
dlg
->
addModule
(
metaData
);
#else
dlg
->
addModule
(
metaData
.
pluginId
());
#endif
}
dlg
->
exec
();
delete
dlg
;
}
...
...
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