diff --git a/core/pluginloader.cpp b/core/pluginloader.cpp index b1e893a9a..72981ae50 100644 --- a/core/pluginloader.cpp +++ b/core/pluginloader.cpp @@ -122,7 +122,7 @@ QSet PluginLoader::pluginsForCapabilities(const QSet &incoming if (!supportedDeviceTypes.isEmpty()) { if (!supportedDeviceTypes.contains(myDeviceType)) { qCDebug(KDECONNECT_CORE) << "Not loading plugin" << service.pluginId() << "because this device of type" << myDeviceType - << "is not supported. Supports:" << supportedDeviceTypes.toList().join(QStringLiteral(", ")); + << "is not supported. Supports:" << supportedDeviceTypes.join(QStringLiteral(", ")); continue; } } diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 79e7c907d..c2fbfbb8a 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -28,7 +28,7 @@ static QString createId() } KdeConnectKcm::KdeConnectKcm(QObject *parent, const QVariantList &args) - : KCModule(parent) + : KCModule(qobject_cast(parent)) , kcmUi(new Ui::KdeConnectKcmUi()) , daemon(new DaemonDbusInterface(this)) , devicesModel(new DevicesModel(this)) diff --git a/kcm/kcm.h b/kcm/kcm.h index 93bb0908a..840d16bb5 100644 --- a/kcm/kcm.h +++ b/kcm/kcm.h @@ -9,6 +9,7 @@ #include #include +#include class QModelIndex; class DeviceDbusInterface; @@ -28,6 +29,13 @@ public: KdeConnectKcm(QObject *parent, const QVariantList &); ~KdeConnectKcm() override; +#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 105, 0) + QWidget *widget() + { + return this; + } +#endif + private: void save() override; diff --git a/kcmplugin/kdeconnectpluginkcm.cpp b/kcmplugin/kdeconnectpluginkcm.cpp index f742e4d9d..f0a2e92d2 100644 --- a/kcmplugin/kdeconnectpluginkcm.cpp +++ b/kcmplugin/kdeconnectpluginkcm.cpp @@ -16,7 +16,7 @@ struct KdeConnectPluginKcmPrivate { }; KdeConnectPluginKcm::KdeConnectPluginKcm(QObject *parent, const QVariantList &args, const QString &pluginName) - : KCModule(parent, args) + : KCModule(qobject_cast(parent), args) , d(new KdeConnectPluginKcmPrivate()) { d->m_deviceId = args.at(0).toString(); diff --git a/kcmplugin/kdeconnectpluginkcm.h b/kcmplugin/kdeconnectpluginkcm.h index bfc4c2f78..7c34b7d45 100644 --- a/kcmplugin/kdeconnectpluginkcm.h +++ b/kcmplugin/kdeconnectpluginkcm.h @@ -8,6 +8,7 @@ #define KDECONNECTPLUGINKCM_H #include +#include #include "core/kdeconnectpluginconfig.h" #include "kdeconnectpluginkcm_export.h" @@ -36,6 +37,13 @@ public: */ KdeConnectPluginConfig *config() const; +#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 105, 0) + QWidget *widget() + { + return this; + } +#endif + private: QScopedPointer d; };