From 5c750385d02116a92fa4c120ccc26abb8267bc97 Mon Sep 17 00:00:00 2001 From: Raquel Medina Date: Wed, 4 Mar 2020 19:32:03 +0100 Subject: eliminate unneeded dependencies on public headers - Remove unneeded dependencies from libqtappfw public headers, specifically MessageEngine and Message hierarchy header files, in preparation for refactoring work on these areas. This change helps shield client apps from the upcoming changes in the library, and highlight the separation between the library's core and the various modules providing public interfaces to those apps. - Make MessageType an scoped enum to fwd declare it. - Update Copyright statement on files updated by this patch. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina Change-Id: I12fd9cdc034aa1166f6448c07befadd9d2042b05 --- weather/weather.cpp | 10 +++++++--- weather/weather.h | 8 +++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'weather') 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 +#include + #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(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 #include -#include "messageengine.h" +class MessageEngine; +class Message; + +enum class MessageType; class Weather : public QObject { -- cgit 1.2.3-korg