aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-08 13:59:27 +0100
committerLaurent Montel <[email protected]>2018-02-08 13:59:27 +0100
commit8cc7b6ac0eaa9fd288641afe07fe056ed32b8612 (patch)
tree0c798aacaab142113ec70e32ae0e7ddb5b2d00ec
parenteaab8cb1ae07f9a973773722afbe24da9942082a (diff)
Port to new macro which will be avaailable in 5.44
-rw-r--r--src/akonadi-contacts/plugins/categorieseditwidget.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/akonadi-contacts/plugins/categorieseditwidget.cpp b/src/akonadi-contacts/plugins/categorieseditwidget.cpp
index c7646c4..65d629c 100644
--- a/src/akonadi-contacts/plugins/categorieseditwidget.cpp
+++ b/src/akonadi-contacts/plugins/categorieseditwidget.cpp
@@ -27,9 +27,13 @@
#include <kcontacts/addressee.h>
#include <KPluginTrader>
#include <QHBoxLayout>
+#include <kcoreaddons_version.h>
+#include <kpluginfactory.h>
+#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 44, 0)
+#define K_PLUGIN_CLASS_WITH_JSON(classname, json) K_PLUGIN_FACTORY_WITH_JSON(classname ## Factory, json, registerPlugin<classname >();)
+#endif
-K_PLUGIN_FACTORY_WITH_JSON(CategoriesEditWidgetFactory, "categorieseditwidgetplugin.json", registerPlugin<CategoriesEditWidget>();
- )
+K_PLUGIN_CLASS_WITH_JSON(CategoriesEditWidget, "categorieseditwidgetplugin.json")
CategoriesEditWidget::CategoriesEditWidget(QWidget *parent, const QList<QVariant> &)
: ContactEditor::CategoriesEditAbstractWidget(parent)