diff options
Diffstat (limited to 'weather')
-rw-r--r-- | weather/weather.cpp | 10 | ||||
-rw-r--r-- | weather/weather.h | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/weather/weather.cpp b/weather/weather.cpp index c77e742..d4992d4 100644 --- a/weather/weather.cpp +++ b/weather/weather.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Konsulko Group + * Copyright (C) 2018-2020 Konsulko Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,14 @@ * limitations under the License. */ +#include <QDebug> +#include <QJsonArray> + #include "message.h" +#include "weathermessage.h" #include "messageengine.h" #include "weather.h" -#include "weathermessage.h" + Weather::Weather (QUrl &url, QObject * parent) : QObject(parent), @@ -52,7 +56,7 @@ void Weather::onDisconnected() void Weather::onMessageReceived(MessageType type, Message *message) { - if (type == WeatherEventMessage) { + if (type == MessageType::WeatherEventMessage) { WeatherMessage *tmsg = qobject_cast<WeatherMessage*>(message); if (tmsg->isEvent()) { diff --git a/weather/weather.h b/weather/weather.h index ffbbcc6..6d33a15 100644 --- a/weather/weather.h +++ b/weather/weather.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Konsulko Group + * Copyright (C) 2018-2020 Konsulko Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,12 @@ #ifndef WEATHER_H #define WEATHER_H -#include <QDebug> #include <QObject> -#include "messageengine.h" +class MessageEngine; +class Message; + +enum class MessageType; class Weather : public QObject { |