mqtt en option de complilation

This commit is contained in:
2026-04-12 21:16:24 +02:00
parent 60327e11de
commit b3fe788121
4 changed files with 90 additions and 69 deletions
+6 -9
View File
@@ -1,11 +1,9 @@
#include <QCoreApplication>
#include <QString>
#include <unistd.h>
//#include <unistd.h>
#include <QtGlobal>
#include <iostream>
#include <QDebug>
#include <sys/socket.h>
#include <netinet/in.h>
//#include <iostream>
//#include <QDebug>
#include <qhttpserver.h>
#include <QHttpServerResponse>
#include "pws2mqtt.h"
@@ -14,9 +12,8 @@
#endif
#include "src/barometertrend.h"
#include "version.h"
#include <sys/types.h>
#include <sys/select.h>
#include <sys/socket.h>
//#include <sys/types.h>
//#include <sys/select.h>
#ifdef WITH_MQTT
#include <QtMqtt>
#include <QtMqtt/QMqttClient>
@@ -55,8 +52,8 @@ int main(int argc, char *argv[])
// Enable logging to journald
qputenv("QT_FORCE_STDERR_LOGGING", QByteArray("0"));
debug(DEBUGMACRO, "declaration of mqttClient", INFO);
#ifdef WITH_MQTT
debug(DEBUGMACRO, "declaration of mqttClient", INFO);
mqttClient = new MqttClient;
#endif
httpServer = new QHttpServer;