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
Akonadi Contacts
Commits
09a792d2
Commit
09a792d2
authored
Aug 18, 2021
by
Nicolas Fella
Committed by
Laurent Montel
Aug 20, 2021
Browse files
Port away from deprecated KPluginLoader
parent
05411707
Changes
1
Show whitespace changes
Inline
Side-by-side
src/contact-editor/editor/generalinfoeditor/generalinfowidget.cpp
View file @
09a792d2
...
...
@@ -20,7 +20,6 @@
#include "web/weblistwidget.h"
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginLoader>
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
...
...
@@ -75,14 +74,16 @@ GeneralInfoWidget::GeneralInfoWidget(QWidget *parent)
label
->
setObjectName
(
QStringLiteral
(
"categorylabel"
));
categoryWidgetLayout
->
addWidget
(
label
);
KPluginLoader
loader
(
QStringLiteral
(
"akonadi/contacts/plugins/categorieseditwidgetplugin"
));
KPluginFactory
*
factory
=
loader
.
factory
();
if
(
factory
)
{
mCategoriesWidget
=
factory
->
create
<
ContactEditor
::
CategoriesEditAbstractWidget
>
(
parent
);
const
KPluginMetaData
editWidgetPlugin
(
QStringLiteral
(
"akonadi/contacts/plugins/categorieseditwidgetplugin"
));
const
auto
result
=
KPluginFactory
::
instantiatePlugin
<
ContactEditor
::
CategoriesEditAbstractWidget
>
(
editWidgetPlugin
,
parent
);
if
(
result
)
{
mCategoriesWidget
=
result
.
plugin
;
}
else
{
mCategoriesWidget
=
new
CategoriesEditWidget
(
parent
);
label
->
setVisible
(
false
);
}
mCategoriesWidget
->
setObjectName
(
QStringLiteral
(
"categories"
));
categoryWidgetLayout
->
addWidget
(
mCategoriesWidget
);
leftLayout
->
addWidget
(
categoryWidget
);
...
...
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