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
9bc0dff8
Commit
9bc0dff8
authored
Aug 20, 2021
by
Laurent Montel
😁
Browse files
Allow to build with KF < 5.86
parent
09a792d2
Pipeline
#75797
passed with stage
in 11 minutes and 54 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/contact-editor/editor/generalinfoeditor/generalinfowidget.cpp
View file @
9bc0dff8
...
...
@@ -11,6 +11,7 @@
#include
"../widgets/imagewidget.h"
#include
"blogfeedwidget.h"
#include
"categorieseditwidget.h"
#include
"kcoreaddons_version.h"
#include
"mail/maillistwidget.h"
#include
"messageformattingwidget.h"
#include
"messaging/messaginglistwidget.h"
...
...
@@ -20,6 +21,7 @@
#include
"web/weblistwidget.h"
#include
<KLocalizedString>
#include
<KPluginFactory>
#include
<KPluginLoader>
#include
<QHBoxLayout>
#include
<QLabel>
#include
<QVBoxLayout>
...
...
@@ -74,11 +76,18 @@ GeneralInfoWidget::GeneralInfoWidget(QWidget *parent)
label
->
setObjectName
(
QStringLiteral
(
"categorylabel"
));
categoryWidgetLayout
->
addWidget
(
label
);
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0)
KPluginLoader
loader
(
QStringLiteral
(
"akonadi/contacts/plugins/categorieseditwidgetplugin"
));
KPluginFactory
*
factory
=
loader
.
factory
();
if
(
factory
)
{
mCategoriesWidget
=
factory
->
create
<
ContactEditor
::
CategoriesEditAbstractWidget
>
(
parent
);
#else
const
KPluginMetaData
editWidgetPlugin
(
QStringLiteral
(
"akonadi/contacts/plugins/categorieseditwidgetplugin"
));
const
auto
result
=
KPluginFactory
::
instantiatePlugin
<
ContactEditor
::
CategoriesEditAbstractWidget
>
(
editWidgetPlugin
,
parent
);
if
(
result
)
{
mCategoriesWidget
=
result
.
plugin
;
#endif
}
else
{
mCategoriesWidget
=
new
CategoriesEditWidget
(
parent
);
label
->
setVisible
(
false
);
...
...
Write
Preview
Supports
Markdown
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