El dilluns, 21 de desembre de 2020, a les 7:16:09 CET, hanyoung va escriure: > KWeatherCore: https://invent.kde.org/libraries/kweathercore is a library for > querying weather forecast data. > During the development of KWeather, we found the need to have a weather > library. > KWeatherCore is the result of extracting weather data fetching code from > KWeather. > I think having a dedicated weather library can serve the following propose: > - simplify the KWeather code > - easier to develop a weather daemon > - potentially less code duplication across KDE
There's quite some things that need improvement: * You don't have d-pointer in most of the public classes * You have quite some code inline in the .h which makes keeping BC harder * You return const Q* & which is not usual in Qt classes locationquerytest is unstable https://paste.debian.net/1177864/ You have a script that extracts translations to libkweather5 but then you do -DTRANSLATION_DOMAIN=\"kweathercore5\" Cheers, Albert > > Many of you may have already seen my previous email to kde-devel mailing list. > Thank you for your constructive suggestions. Here are something I want to > clarify: > > > I would also propose to consider doing a demon instead, so different > > programs/processes all interested in weather forecast data could share the > > data > The end goal is a daemon indeed, but we want to build the daemon upon the > library. This would give us flexibility > in the future if we don't want a daemon. At least KWeather and other > projects can still benefit from the code. > > > but we want to make sure we don't end up with two things. > I admit there are some overlapped functionalities. But KWeatherCore isn't > designed as a weather data provider as Weather DataEngine. > Instead, it's trying to be the building block of weather related > applications. KWeatherCore saves you the hassle of > dealing with APIs, getting locations and converting timezone. You can build > a daemon with it, or you can > use it in your applications. For example, KItinerary and KWeather use the > same weather API, but don't share code. > That means two code base to maintain. Regarding the dynamic nature of > online APIs, it's better to have one library, > so other applications don't need to be worried about their APIs being > depraved, and they aren't able to update it in time. > > Though not currently implemented, KWeatherCore does intend to have weather > alerts added. We hope it can be done in this Sok > https://community.kde.org/SoK/Ideas/2021#KWeather > With this bit added, then the work on weather daemon can be started. > > Regards, > Han Young > >