Fix KF5 build
This commit is contained in:
parent
44be5caf5b
commit
4993daa973
5 changed files with 19 additions and 3 deletions
|
@ -122,7 +122,7 @@ QSet<QString> PluginLoader::pluginsForCapabilities(const QSet<QString> &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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ static QString createId()
|
|||
}
|
||||
|
||||
KdeConnectKcm::KdeConnectKcm(QObject *parent, const QVariantList &args)
|
||||
: KCModule(parent)
|
||||
: KCModule(qobject_cast<QWidget *>(parent))
|
||||
, kcmUi(new Ui::KdeConnectKcmUi())
|
||||
, daemon(new DaemonDbusInterface(this))
|
||||
, devicesModel(new DevicesModel(this))
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <KCModule>
|
||||
#include <QStandardItemModel>
|
||||
#include <kconfigwidgets_version.h>
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ struct KdeConnectPluginKcmPrivate {
|
|||
};
|
||||
|
||||
KdeConnectPluginKcm::KdeConnectPluginKcm(QObject *parent, const QVariantList &args, const QString &pluginName)
|
||||
: KCModule(parent, args)
|
||||
: KCModule(qobject_cast<QWidget *>(parent), args)
|
||||
, d(new KdeConnectPluginKcmPrivate())
|
||||
{
|
||||
d->m_deviceId = args.at(0).toString();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define KDECONNECTPLUGINKCM_H
|
||||
|
||||
#include <KCModule>
|
||||
#include <kconfigwidgets_version.h>
|
||||
|
||||
#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<KdeConnectPluginKcmPrivate> d;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue