https://bugs.kde.org/show_bug.cgi?id=503138

Ismael Asensio <isma...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/kdeplasma-addons/-/commi |ma/kdeplasma-addons/-/commi
                   |t/923d22128332a019bfa2893e3 |t/b658c27508117bccb1ba0637a
                   |6c31181bec61a10             |79f5c328b6ec7f6

--- Comment #6 from Ismael Asensio <isma...@gmail.com> ---
Git commit b658c27508117bccb1ba0637a79f5c328b6ec7f6 by Ismael Asensio.
Committed on 23/04/2025 at 10:39.
Pushed by iasensio into branch 'Plasma/6.3'.

applets/weather: Expose and use default units directly

In the weather applet we want to have locale-aware default units
(ex ºF vs ºC) instead of hardcoded defaults in the config.xml.

This was done by writing these defaults into the config if empty.
This worked while doing so from the applet constructor, which was
wrong and caused other bugs. Setting them in the `init()` method
doesn't work either as the applet QML configuration is not correctly
updated from config at this point.

Instead, let's expose these defaults in the units model and use them
as actual fallback values in QML, which should be more robust that
messing with the plasma configuration, while also reducing the custom
WeatherApplet code.
FIXED-IN: 6.3.5


(cherry picked from commit 923d22128332a019bfa2893e36c31181bec61a10)

Co-authored-by: Ismael Asensio <isma...@gmail.com>

M  +4    -4    applets/weather/package/contents/ui/main.qml
M  +8    -2    applets/weather/plugin/abstractunitlistmodel.cpp
M  +4    -1    applets/weather/plugin/abstractunitlistmodel.h
M  +24   -6    applets/weather/plugin/plugin.cpp
M  +0    -24   applets/weather/weatherapplet.cpp
M  +0    -4    applets/weather/weatherapplet.h

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/b658c27508117bccb1ba0637a79f5c328b6ec7f6

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to