Commit 6750b75b authored by Ahmad Samir's avatar Ahmad Samir
Browse files

KDeclarative::ConfigPropertyMap has been deprecated since 5.89

Use KConfigPropertyMap from KConfigQml.
parent 79e2cbeb
Pipeline #185519 passed with stage
in 2 minutes and 28 seconds
......@@ -22,6 +22,7 @@ target_link_libraries(plasma_appletscript_declarative
Qt${QT_MAJOR_VERSION}::Quick
Qt${QT_MAJOR_VERSION}::Qml
KF5::Activities
KF5::ConfigQml
KF5::KIOCore
KF5::KIOWidgets
KF5::Declarative
......
......@@ -28,7 +28,8 @@
#include "containmentinterface.h"
#include "wallpaperinterface.h"
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
#include <kdeclarative/configpropertymap.h>
#else
#include <KConfigPropertyMap>
......@@ -140,7 +141,7 @@ void AppletInterface::init()
return;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
m_configuration = new KDeclarative::ConfigPropertyMap(applet()->configScheme(), this);
#else
m_configuration = new KConfigPropertyMap(applet()->configScheme(), this);
......
......@@ -13,6 +13,7 @@
#include <QQuickView>
#include <KPluginMetaData>
#include <kdeclarative/kdeclarative_export.h>
#include <Plasma/Applet>
#include <Plasma/Theme>
......@@ -28,7 +29,7 @@ class KConfigPropertyMap;
namespace KDeclarative
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
class ConfigPropertyMap;
#endif
class QmlObject;
......@@ -528,7 +529,7 @@ private:
QStringList m_actions;
QHash<QString, QActionGroup *> m_actionGroups;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
KDeclarative::ConfigPropertyMap *m_configuration;
#else
KConfigPropertyMap *m_configuration;
......
......@@ -29,7 +29,8 @@
#include "plasmoid/containmentinterface.h"
#include "plasmoid/wallpaperinterface.h"
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <kdeclarative/kdeclarative_export.h>
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
#include <kdeclarative/configpropertymap.h>
#else
#include <KConfigPropertyMap>
......@@ -52,7 +53,7 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant
qmlRegisterUncreatableType<WallpaperInterface>(uri, 2, 0, "Wallpaper", QStringLiteral("Do not create objects of type Wallpaper"));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 89)
qmlRegisterAnonymousType<KDeclarative::ConfigPropertyMap>(uri, 1);
#else
qmlRegisterAnonymousType<KConfigPropertyMap>(uri, 1);
......
......@@ -7,7 +7,8 @@
#include "wallpaperinterface.h"
#include "containmentinterface.h"
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
#include <kdeclarative/configpropertymap.h>
#else
#include <KConfigPropertyMap>
......@@ -79,7 +80,7 @@ QString WallpaperInterface::pluginName() const
return m_wallpaperPlugin;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
KDeclarative::ConfigPropertyMap *WallpaperInterface::configuration() const
#else
KConfigPropertyMap *WallpaperInterface::configuration() const
......@@ -143,7 +144,7 @@ void WallpaperInterface::syncWallpaperPackage()
m_configLoader = nullptr;
m_configuration = nullptr;
if (configScheme()) {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
m_configuration = new KDeclarative::ConfigPropertyMap(configScheme(), this);
#else
m_configuration = new KConfigPropertyMap(configScheme(), this);
......
......@@ -11,6 +11,7 @@
#include <QQuickItem>
#include <KPackage/Package>
#include <kdeclarative/kdeclarative_export.h>
class KConfigLoader;
class KActionCollection;
......@@ -20,7 +21,7 @@ class ContainmentInterface;
namespace KDeclarative
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
class ConfigPropertyMap;
#endif
class QmlObject;
......@@ -38,7 +39,7 @@ class WallpaperInterface : public QQuickItem
Q_OBJECT
Q_PROPERTY(QString pluginName READ pluginName NOTIFY packageChanged)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
Q_PROPERTY(KDeclarative::ConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged)
#else
Q_PROPERTY(KConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged)
......@@ -61,7 +62,7 @@ public:
QString pluginName() const;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
KDeclarative::ConfigPropertyMap *configuration() const;
#else
KConfigPropertyMap *configuration() const;
......@@ -101,7 +102,7 @@ private:
ContainmentInterface *m_containmentInterface;
KDeclarative::QmlObject *m_qmlObject;
KPackage::Package m_pkg;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 89)
KDeclarative::ConfigPropertyMap *m_configuration;
#else
KConfigPropertyMap *m_configuration;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment