Closed vitalykorotkov closed 5 years ago
The wetter.com source does not supply the "current temperature". Instead it's trying to show an icon.
property string currentConditionIconName: {
var conditionIconName = data["Condition Icon"] || todaysForecastIcon || null
return conditionIconName ? Util.existingWeatherIconName(conditionIconName) : "weather-none-available"
}
It seems the Util
module does not exist in plasma 5.12, which means it can't use the Util.existingWeatherIconName
function.
Unfortunately, the Plasma 5.12 code doesn't allow me to use that function at all, since it uses a private C++ applet function, unlike the Plasma 5.14 code which was written to allow QML widget to use the Util function.
@IkiruOG the following code in WeatherData.qml
should work.
property string currentConditionIconName: {
var conditionIconName = data["Condition Icon"] || todaysForecastIcon || null
return conditionIconName ? conditionIconName : "weather-none-available"
}
It only needs that Util
function to display the "weather-none-available" icon if the user's icon theme is missing the current weather icon.
Sadly. Then I'll wait for a plasma update or update it myself. This code works. The icon is now displayed. Thank you!
This code works. The icon is now displayed.
Awesome! v3 will have code to check if it's Plasma 5.12, and if so, not use the function. That function isn't really necessary as long as your icon theme has all the weather icons.
openSUSE Leap 15, KDE Plasma 5.12.6