From 9e5b735e144631ec93a3c87e2c59b476154e5dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 8 Aug 2025 14:37:54 +0200 Subject: [PATCH] logilink: Add Qt6 support --- logilink/integrationpluginlogilink.cpp | 17 +++++++++-------- logilink/integrationpluginlogilink.h | 4 ++-- logilink/logilink.pro | 2 -- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/logilink/integrationpluginlogilink.cpp b/logilink/integrationpluginlogilink.cpp index c5058ada..11cc3180 100644 --- a/logilink/integrationpluginlogilink.cpp +++ b/logilink/integrationpluginlogilink.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2024, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -30,9 +30,10 @@ #include "integrationpluginlogilink.h" #include "plugininfo.h" -#include "plugintimer.h" +#include #include + #include #include #include @@ -243,30 +244,30 @@ void IntegrationPluginLogilink::getStates(Thing *thing) } thing->setStateValue(pdu8p01ConnectedStateTypeId, true); if (xml.readNextStartElement()) { - if (xml.name() == "response") { + if (xml.name() == QString("response")) { qCDebug(dcLogilink()) << "XML contains response"; } else { qCWarning(dcLogilink()) << "xml name" << xml.name(); } while(xml.readNextStartElement()) { qCDebug(dcLogilink()) << "XML name" << xml.name(); - if (xml.name() == "curBan") { + if (xml.name() == QString("curBan")) { auto current = xml.readElementText().toDouble(); qCDebug(dcLogilink()) << "Current" << current; thing->setStateValue(pdu8p01TotalLoadStateTypeId, current); - } else if (xml.name() == "statBan") { + } else if (xml.name() == QString("statBan")) { auto status = xml.readElementText(); qCDebug(dcLogilink()) << "Status" << status; thing->setStateValue(pdu8p01StatusStateTypeId, status); - } else if (xml.name() == "tempBan") { + } else if (xml.name() == QString("tempBan")) { auto temperature = xml.readElementText().toDouble(); qCDebug(dcLogilink()) << "Temperature" << temperature; thing->setStateValue(pdu8p01TemperatureStateTypeId, temperature); - } else if (xml.name() == "humBan") { + } else if (xml.name() == QString("humBan")) { auto humidity = xml.readElementText().toDouble(); qCDebug(dcLogilink()) << "hummidity" << humidity; thing->setStateValue(pdu8p01HumidityStateTypeId, humidity); - } else if (xml.name().startsWith("outletStat")){ + } else if (xml.name().startsWith(QString("outletStat"))){ int socketNumber = xml.name().right(1).toInt(); bool socketValue = xml.readElementText().startsWith("on"); auto socketThing = myThings().filterByParentId(thing->id()) diff --git a/logilink/integrationpluginlogilink.h b/logilink/integrationpluginlogilink.h index 5d77ad79..c2073d70 100644 --- a/logilink/integrationpluginlogilink.h +++ b/logilink/integrationpluginlogilink.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2024, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -31,7 +31,7 @@ #ifndef INTEGRATIONPLUGINLOGILINK_H #define INTEGRATIONPLUGINLOGILINK_H -#include "integrations/integrationplugin.h" +#include #include diff --git a/logilink/logilink.pro b/logilink/logilink.pro index 41fb471d..9dd6d111 100644 --- a/logilink/logilink.pro +++ b/logilink/logilink.pro @@ -2,8 +2,6 @@ include(../plugins.pri) QT += network xml -TARGET = $$qtLibraryTarget(nymea_integrationpluginlogilink) - SOURCES += \ integrationpluginlogilink.cpp \