summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-08 13:59:01 +0100
committerLaurent Montel <[email protected]>2018-02-08 13:59:01 +0100
commit920bc5d66a7ee3b51270b05a2a3256026e3d95ba (patch)
tree029cec9c977a4ecc82462101c06cbb2fb93141cb
parent16baff10b18670e82f1bed13701989d76b570c40 (diff)
Port to new macro which will be avaailable in 5.44
-rw-r--r--configuration/akregator_config_advanced.cpp7
-rw-r--r--configuration/akregator_config_appearance.cpp8
-rw-r--r--configuration/akregator_config_browser.cpp7
3 files changed, 16 insertions, 6 deletions
diff --git a/configuration/akregator_config_advanced.cpp b/configuration/akregator_config_advanced.cpp
index 363beb5..9c14667 100644
--- a/configuration/akregator_config_advanced.cpp
+++ b/configuration/akregator_config_advanced.cpp
@@ -33,9 +33,12 @@
#include <QVBoxLayout>
using namespace Akregator;
+#include <kcoreaddons_version.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(KCMAkregatorAdvancedConfigFactory, "akregator_config_advanced.json", registerPlugin<KCMAkregatorAdvancedConfig>();
- )
+K_PLUGIN_CLASS_WITH_JSON(KCMAkregatorAdvancedConfig, "akregator_config_advanced.json")
KCMAkregatorAdvancedConfig::KCMAkregatorAdvancedConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
diff --git a/configuration/akregator_config_appearance.cpp b/configuration/akregator_config_appearance.cpp
index 362bbbf..51fe618 100644
--- a/configuration/akregator_config_appearance.cpp
+++ b/configuration/akregator_config_appearance.cpp
@@ -33,8 +33,12 @@
using namespace Akregator;
-K_PLUGIN_FACTORY_WITH_JSON(KCMAkregatorAppearanceConfigFactory, "akregator_config_appearance.json", registerPlugin<KCMAkregatorAppearanceConfig>();
- )
+#include <kcoreaddons_version.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_CLASS_WITH_JSON(KCMAkregatorAppearanceConfig, "akregator_config_appearance.json")
KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
diff --git a/configuration/akregator_config_browser.cpp b/configuration/akregator_config_browser.cpp
index 1c108b2..3af8d5e 100644
--- a/configuration/akregator_config_browser.cpp
+++ b/configuration/akregator_config_browser.cpp
@@ -33,9 +33,12 @@
#include <QVBoxLayout>
using namespace Akregator;
+#include <kcoreaddons_version.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(KCMAkregatorBrowserConfigFactory, "akregator_config_browser.json", registerPlugin<KCMAkregatorBrowserConfig>();
- )
+K_PLUGIN_CLASS_WITH_JSON(KCMAkregatorBrowserConfig, "akregator_config_browser.json")
KCMAkregatorBrowserConfig::KCMAkregatorBrowserConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)