diff --git a/udpcommander/integrationpluginudpcommander.cpp b/udpcommander/integrationpluginudpcommander.cpp index 97c09b5f..6ceb82f7 100644 --- a/udpcommander/integrationpluginudpcommander.cpp +++ b/udpcommander/integrationpluginudpcommander.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -29,9 +29,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "integrationpluginudpcommander.h" -#include "integrations/thing.h" #include "plugininfo.h" +#include + IntegrationPluginUdpCommander::IntegrationPluginUdpCommander() { @@ -53,7 +54,7 @@ void IntegrationPluginUdpCommander::setupThing(ThingSetupInfo *info) } qCDebug(dcUdpCommander()) << "Listening on port" << port; - connect(udpSocket, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams())); + connect(udpSocket, &QUdpSocket::readyRead, this, &IntegrationPluginUdpCommander::readPendingDatagrams); m_receiverList.insert(udpSocket, thing); return info->finish(Thing::ThingErrorNoError); @@ -76,7 +77,7 @@ void IntegrationPluginUdpCommander::executeAction(ThingActionInfo *info) int port = thing->paramValue(udpCommanderThingPortParamTypeId).toInt(); QHostAddress address = QHostAddress(thing->paramValue(udpCommanderThingAddressParamTypeId).toString()); QByteArray data = action.param(udpCommanderTriggerActionDataParamTypeId).value().toByteArray(); - qDebug(dcUdpCommander()) << "Send UDP datagram:" << data << "address:" << address.toIPv4Address() << "port:" << port; + qCDebug(dcUdpCommander()) << "Send UDP datagram:" << data << "address:" << address.toIPv4Address() << "port:" << port; udpSocket->writeDatagram(data, address, port); return info->finish(Thing::ThingErrorNoError); diff --git a/udpcommander/integrationpluginudpcommander.h b/udpcommander/integrationpluginudpcommander.h index 52b29ee5..475d5e04 100644 --- a/udpcommander/integrationpluginudpcommander.h +++ b/udpcommander/integrationpluginudpcommander.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -31,7 +31,7 @@ #ifndef INTEGRATIONPLUGINUDPCOMMANDER_H #define INTEGRATIONPLUGINUDPCOMMANDER_H -#include "integrations/integrationplugin.h" +#include #include #include diff --git a/udpcommander/udpcommander.pro b/udpcommander/udpcommander.pro index ab0034a4..85940b7e 100644 --- a/udpcommander/udpcommander.pro +++ b/udpcommander/udpcommander.pro @@ -1,8 +1,6 @@ include(../plugins.pri) -QT += network - -TARGET = $$qtLibraryTarget(nymea_integrationpluginudpcommander) +QT *= network SOURCES += \ integrationpluginudpcommander.cpp