Add Qt6 support
This commit is contained in:
parent
bacf383a8e
commit
ac156dd3b0
@ -1,6 +1,6 @@
|
|||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2022, 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.
|
||||||
@ -38,7 +38,6 @@ AirConditioningJsonHandler::AirConditioningJsonHandler(AirConditioningManager *m
|
|||||||
JsonHandler(parent),
|
JsonHandler(parent),
|
||||||
m_manager(manager)
|
m_manager(manager)
|
||||||
{
|
{
|
||||||
|
|
||||||
registerEnum<AirConditioningManager::AirConditioningError>();
|
registerEnum<AirConditioningManager::AirConditioningError>();
|
||||||
registerFlag<ZoneInfo::ZoneStatusFlag, ZoneInfo::ZoneStatus>();
|
registerFlag<ZoneInfo::ZoneStatusFlag, ZoneInfo::ZoneStatus>();
|
||||||
registerEnum<ZoneInfo::SetpointOverrideMode>();
|
registerEnum<ZoneInfo::SetpointOverrideMode>();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2022, 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.
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "jsonrpc/jsonhandler.h"
|
#include <jsonrpc/jsonhandler.h>
|
||||||
|
|
||||||
class AirConditioningManager;
|
class AirConditioningManager;
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ QPair<AirConditioningManager::AirConditioningError, ZoneInfo> AirConditioningMan
|
|||||||
AirConditioningError status = verifyThingIds(thermostats, windowSensors, indoorSensors, outdoorSensors, notifications);
|
AirConditioningError status = verifyThingIds(thermostats, windowSensors, indoorSensors, outdoorSensors, notifications);
|
||||||
if (status != AirConditioningErrorNoError) {
|
if (status != AirConditioningErrorNoError) {
|
||||||
qCWarning(dcAirConditioning()) << "Invalid thing id" << status << "in" << thermostats;
|
qCWarning(dcAirConditioning()) << "Invalid thing id" << status << "in" << thermostats;
|
||||||
return qMakePair<AirConditioningError, ZoneInfo>(status, ZoneInfo());
|
return QPair<AirConditioningError, ZoneInfo>(status, ZoneInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
zone.setThermostats(thermostats);
|
zone.setThermostats(thermostats);
|
||||||
@ -100,7 +100,7 @@ QPair<AirConditioningManager::AirConditioningError, ZoneInfo> AirConditioningMan
|
|||||||
saveZones();
|
saveZones();
|
||||||
|
|
||||||
emit zoneAdded(zone);
|
emit zoneAdded(zone);
|
||||||
return qMakePair<AirConditioningError, ZoneInfo>(AirConditioningErrorNoError, zone);
|
return QPair<AirConditioningError, ZoneInfo>(AirConditioningErrorNoError, zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
AirConditioningManager::AirConditioningError AirConditioningManager::removeZone(const QUuid &zoneId)
|
AirConditioningManager::AirConditioningError AirConditioningManager::removeZone(const QUuid &zoneId)
|
||||||
@ -325,7 +325,8 @@ void AirConditioningManager::updateZone(const QUuid &zoneId)
|
|||||||
|
|
||||||
bool timeScheduleActive = false;
|
bool timeScheduleActive = false;
|
||||||
bool overrideActive = false;
|
bool overrideActive = false;
|
||||||
qCDebug(dcAirConditioning()) << "Standby temp:" << zone.standbySetpoint() << "Override:" << zone.setpointOverrideMode() << zone.setpointOverride() << zone.setpointOverrideEnd().toString(Qt::DefaultLocaleShortDate) << "Schedules:" << zone.weekSchedule();
|
|
||||||
|
qCDebug(dcAirConditioning()) << "Standby temp:" << zone.standbySetpoint() << "Override:" << zone.setpointOverrideMode() << zone.setpointOverride() << zone.setpointOverrideEnd().toString() << "Schedules:" << zone.weekSchedule();
|
||||||
|
|
||||||
if (zone.setpointOverrideMode() == ZoneInfo::SetpointOverrideModeUnlimited
|
if (zone.setpointOverrideMode() == ZoneInfo::SetpointOverrideModeUnlimited
|
||||||
|| (zone.setpointOverrideMode() == ZoneInfo::SetpointOverrideModeTimed && zone.setpointOverrideEnd() > now)
|
|| (zone.setpointOverrideMode() == ZoneInfo::SetpointOverrideModeTimed && zone.setpointOverrideEnd() > now)
|
||||||
|
|||||||
@ -1,14 +1,25 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
TARGET = $$qtLibraryTarget(nymea_experiencepluginairconditioning)
|
TARGET = $$qtLibraryTarget(nymea_experiencepluginairconditioning)
|
||||||
|
|
||||||
CONFIG += plugin link_pkgconfig c++11
|
greaterThan(QT_MAJOR_VERSION, 5) {
|
||||||
|
message("Building using Qt6 support")
|
||||||
|
CONFIG *= c++17
|
||||||
|
QMAKE_LFLAGS *= -std=c++17
|
||||||
|
QMAKE_CXXFLAGS *= -std=c++17
|
||||||
|
} else {
|
||||||
|
message("Building using Qt5 support")
|
||||||
|
CONFIG *= c++11
|
||||||
|
QMAKE_LFLAGS *= -std=c++11
|
||||||
|
QMAKE_CXXFLAGS *= -std=c++11
|
||||||
|
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG += plugin link_pkgconfig
|
||||||
PKGCONFIG += nymea
|
PKGCONFIG += nymea
|
||||||
|
|
||||||
QT -= gui
|
QT -= gui
|
||||||
QT += network sql
|
QT += network sql
|
||||||
|
|
||||||
include(../config.pri)
|
|
||||||
|
|
||||||
HEADERS += experiencepluginairconditioning.h \
|
HEADERS += experiencepluginairconditioning.h \
|
||||||
airconditioningjsonhandler.h \
|
airconditioningjsonhandler.h \
|
||||||
airconditioningmanager.h \
|
airconditioningmanager.h \
|
||||||
|
|||||||
Reference in New Issue
Block a user