From 22191713af1099768c379a5b1e5d937ec368123c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 8 Aug 2025 15:38:09 +0200 Subject: [PATCH] openuv: Add Qt6 support --- openuv/integrationpluginopenuv.cpp | 10 ++++++---- openuv/integrationpluginopenuv.h | 5 ++--- openuv/openuv.pro | 8 +++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/openuv/integrationpluginopenuv.cpp b/openuv/integrationpluginopenuv.cpp index 54ab464b..d2381942 100644 --- a/openuv/integrationpluginopenuv.cpp +++ b/openuv/integrationpluginopenuv.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,11 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "integrationpluginopenuv.h" -#include "integrations/thing.h" #include "plugininfo.h" +#include +#include + #include #include #include @@ -133,7 +135,7 @@ void IntegrationPluginOpenUv::getUvIndex(Thing *thing) request.setRawHeader("x-access-token", m_apiKey); QNetworkReply *reply = hardwareManager()->networkManager()->get(request); - connect(reply, &QNetworkReply::finished, this, [reply, thing, this] { + connect(reply, &QNetworkReply::finished, this, [reply, thing] { reply->deleteLater(); int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); @@ -150,7 +152,7 @@ void IntegrationPluginOpenUv::getUvIndex(Thing *thing) QJsonParseError error; QJsonDocument data = QJsonDocument::fromJson(reply->readAll(), &error); if (error.error != QJsonParseError::NoError) { - qDebug(dcOpenUv()) << "Recieved invalide JSON object"; + qCDebug(dcOpenUv()) << "Recieved invalide JSON object"; return; } QVariantMap result = data.toVariant().toMap().value("result").toMap(); diff --git a/openuv/integrationpluginopenuv.h b/openuv/integrationpluginopenuv.h index c9d128c6..01bbbc56 100644 --- a/openuv/integrationpluginopenuv.h +++ b/openuv/integrationpluginopenuv.h @@ -31,9 +31,8 @@ #ifndef INTEGRATIONPLUGINOPENUV_H #define INTEGRATIONPLUGINOPENUV_H -#include "plugintimer.h" -#include "integrations/integrationplugin.h" -#include "network/networkaccessmanager.h" +#include +#include #include #include diff --git a/openuv/openuv.pro b/openuv/openuv.pro index a5896008..a050220b 100644 --- a/openuv/openuv.pro +++ b/openuv/openuv.pro @@ -1,13 +1,11 @@ include(../plugins.pri) -TARGET = $$qtLibraryTarget(nymea_integrationpluginopenuv) - -QT+= network +QT += network SOURCES += \ - integrationpluginopenuv.cpp \ + integrationpluginopenuv.cpp HEADERS += \ - integrationpluginopenuv.h \ + integrationpluginopenuv.h