Skip to content

Commit

Permalink
don't replace current weather from forecast
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Dec 12, 2023
1 parent dee7e3b commit 54695e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/weather/currentweather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void CurrentWeather::handleForecast(const QByteArray &reply)

QJsonObject weather = obj.value("weather").toArray().first().toObject();

m_weatherIcon = weather.value("icon").toVariant().toString();
QString weatherIcon = weather.value("icon").toVariant().toString();

int code = weather.value("id").toVariant().toInt();
QString desc = weather.value("description").toVariant().toString();
Expand Down Expand Up @@ -209,7 +209,7 @@ void CurrentWeather::handleForecast(const QByteArray &reply)
f.setDateTime(dt);
f.setDescription(desc);
f.setWeatherCode(code);
f.setWeatherIcon(m_weatherIcon);
f.setWeatherIcon(weatherIcon);
f.setPressure(main.value("pressure").toDouble());
f.setHumidity(main.value("humidity").toDouble());
}
Expand Down

0 comments on commit 54695e0

Please sign in to comment.