SUMMARY It doesn't seem like the weather widget refreshes its data shortly after resuming from suspend. One needs to wait until the next update interval (default 30 minutes) for new data to come in. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.16.2 KDE Frameworks Version: 5.59.0 Qt Version: 5.13.0
The "time" data engine connects to "resumingFromSuspend". The "weather" engine would need similar code. https://cgit.kde.org/plasma-workspace.git/tree/dataengines/time/timeengine.cpp https://cgit.kde.org/plasma-workspace.git/tree/dataengines/weather/weatherengine.cpp
I could fix this, but I don't know what is the correct name for the weather in /org/kde/kcmshell_clock. Something like /org/kde/kcmshell_weather? Thanks My actual diff (not tested): diff --git a/dataengines/weather/weatherengine.cpp b/dataengines/weather/weatherengine.cpp index 53189021..301ae3f9 100644 --- a/dataengines/weather/weatherengine.cpp +++ b/dataengines/weather/weatherengine.cpp @@ -20,6 +20,7 @@ #include "weatherengine.h" +#include <QDBusConnection> #include <QTimer> #include <KSycoca> @@ -46,6 +47,14 @@ WeatherEngine::WeatherEngine(QObject *parent, const QVariantList& args) // Get the list of available plugins but don't load them connect(KSycoca::self(), static_cast<void (KSycoca::*)(const QStringList&)>(&KSycoca::databaseChanged), this, &WeatherEngine::updateIonList); + + dbus.connect(QString(), "/org/kde/kcmshell_clock", "org.kde.kcmshell_clock", "weatherUpdated", this, SLOT(startReconnect())); + dbus.connect(QStringLiteral("org.kde.Solid.PowerManagement"), + QStringLiteral("/org/kde/Solid/PowerManagement/Actions/SuspendSession"), + QStringLiteral("org.kde.Solid.PowerManagement.Actions.SuspendSession"), + QStringLiteral("resumingFromSuspend"), + this, + SLOT(startReconnect())); updateIonList(); }
Doesn't it work if you only use the second connect() call?
*** Bug 478853 has been marked as a duplicate of this bug. ***
Git commit 038f0d6a303e5674f594003be2c8c298ed2f47ca by Nate Graham, on behalf of Bohdan Onofriichuk. Committed on 17/07/2025 at 16:25. Pushed by ngraham into branch 'master'. applets/weather: check for forecast updates when system wakes up from sleep Update the forecast, if outdated, after the system wakes up from sleep. Otherwise, there can be long period between the start and end of sleep, so the applet will show outdated forecast until the update timer will be activated again. FIXED-IN: 6.5.0 M +1 -0 applets/weather/CMakeLists.txt M +40 -0 applets/weather/forecastcontrol.cpp M +4 -0 applets/weather/forecastcontrol.h https://invent.kde.org/plasma/kdeplasma-addons/-/commit/038f0d6a303e5674f594003be2c8c298ed2f47ca