keba: Add Qt6 support

master
Simon Stürz 2025-08-08 13:57:23 +02:00
parent 6091d24574
commit ecd29be68e
4 changed files with 14 additions and 12 deletions

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright 2013 - 2024, nymea GmbH * Copyright 2013 - 2025, nymea GmbH
* Contact: contact@nymea.io * Contact: contact@nymea.io
* *
* This file is part of nymea. * This file is part of nymea.
@ -28,9 +28,9 @@
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "plugininfo.h"
#include "kebaproductinfo.h"
#include "integrationpluginkeba.h" #include "integrationpluginkeba.h"
#include "kebaproductinfo.h"
#include "plugininfo.h"
#include <QJsonDocument> #include <QJsonDocument>
#include <QUdpSocket> #include <QUdpSocket>

View File

@ -1,8 +1,6 @@
include(../plugins.pri) include(../plugins.pri)
QT += network QT *= network
TARGET = $$qtLibraryTarget(nymea_integrationpluginkeba)
SOURCES += \ SOURCES += \
integrationpluginkeba.cpp \ integrationpluginkeba.cpp \

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright 2013 - 2021, nymea GmbH * Copyright 2013 - 2025, nymea GmbH
* Contact: contact@nymea.io * Contact: contact@nymea.io
* *
* This file is part of nymea. * This file is part of nymea.
@ -228,11 +228,11 @@ signals:
void reachableChanged(bool status); void reachableChanged(bool status);
void commandExecuted(QUuid requestId, bool success); void commandExecuted(QUuid requestId, bool success);
void deviceInformationReceived(const QString &firmware); void deviceInformationReceived(const QString &firmware);
void reportOneReceived(const ReportOne &reportOne); void reportOneReceived(const KeContact::ReportOne &reportOne);
void reportTwoReceived(const ReportTwo &reportTwo); void reportTwoReceived(const KeContact::ReportTwo &reportTwo);
void reportThreeReceived(const ReportThree &reportThree); void reportThreeReceived(const KeContact::ReportThree &reportThree);
void report1XXReceived(int reportNumber, const Report1XX &report); void report1XXReceived(int reportNumber, const KeContact::Report1XX &report);
void broadcastReceived(BroadcastType type, const QVariant &content); void broadcastReceived(KeContact::BroadcastType type, const QVariant &content);
private slots: private slots:
void onReceivedDatagram(const QHostAddress &address, const QByteArray &datagram); void onReceivedDatagram(const QHostAddress &address, const QByteArray &datagram);

View File

@ -37,7 +37,11 @@ KeContactDataLayer::KeContactDataLayer(QObject *parent) : QObject(parent)
m_udpSocket = new QUdpSocket(this); m_udpSocket = new QUdpSocket(this);
connect(m_udpSocket, &QUdpSocket::readyRead, this, &KeContactDataLayer::readPendingDatagrams); connect(m_udpSocket, &QUdpSocket::readyRead, this, &KeContactDataLayer::readPendingDatagrams);
connect(m_udpSocket, &QUdpSocket::stateChanged, this, &KeContactDataLayer::onSocketStateChanged); connect(m_udpSocket, &QUdpSocket::stateChanged, this, &KeContactDataLayer::onSocketStateChanged);
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
connect(m_udpSocket, &QUdpSocket::errorOccurred, this, &KeContactDataLayer::onSocketError);
#else
connect(m_udpSocket, SIGNAL(error(QAbstractSocket::SocketError)),this, SLOT(onSocketError(QAbstractSocket::SocketError))); connect(m_udpSocket, SIGNAL(error(QAbstractSocket::SocketError)),this, SLOT(onSocketError(QAbstractSocket::SocketError)));
#endif
} }
KeContactDataLayer::~KeContactDataLayer() KeContactDataLayer::~KeContactDataLayer()