KWeatherCore
weatherforecastsource.cpp
41 QFile cache(KWeatherCorePrivate::getCacheDirectory(latitude, longitude).path() + QStringLiteral("/cache.json"));
45 auto weatherforecast = WeatherForecast::fromJson(QJsonDocument::fromJson(cache.readAll()).object());
68PendingWeatherForecast *WeatherForecastSource::requestData(const KWeatherCore::LocationQueryResult &result)
Class represents location query result.
Definition locationqueryresult.h:26
The PendingWeatherForecast class contains the reply to an asynchronous weather forecast request.
Definition pendingweatherforecast.h:26
KI18NLOCALEDATA_EXPORT const char * fromLocation(float latitude, float longitude)
QDateTime currentDateTime()
bool exists(const QString &fileName)
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
QByteArray readAll()
ReadOnly
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
NoLessSafeRedirectPolicy
GenericCacheLocation
QString writableLocation(StandardLocation type)
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.