From 458fdeac4bd976fd66044f71a202c0bf2bd8e82a Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sat, 26 Jan 2019 11:52:57 +0100 Subject: [PATCH 01/11] [weather dataengine] bbc: use night icons for forecast "Tonight" --- dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp b/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp index 9bb65e070..2a59e8b55 100644 --- a/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp +++ b/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp @@ -846,7 +846,11 @@ void UKMETIon::parseFiveDayForecast(const QString& source, QXmlStreamReader& xml const QString summaryLC = summary.toLower(); forecast->period = period; - forecast->iconName = getWeatherIcon(dayIcons(), summaryLC); + if (forecast->period == QLatin1String("Tonight")) { + forecast->iconName = getWeatherIcon(nightIcons(), summaryLC); + } else { + forecast->iconName = getWeatherIcon(dayIcons(), summaryLC); + } // db uses original strings normalized to lowercase, but we prefer the unnormalized if without translation const QString summaryTranslated = i18nc("weather forecast", summaryLC.toUtf8().data()); forecast->summary = (summaryTranslated != summaryLC) ? summaryTranslated : summary; From 91633c6cefbe9c1465f9a7bd875da042f8391c4e Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sat, 26 Jan 2019 11:53:36 +0100 Subject: [PATCH 02/11] [weather dataengine] noaa: add another forecast string found in use --- dataengines/weather/ions/data/noaa_i18n.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/dataengines/weather/ions/data/noaa_i18n.dat b/dataengines/weather/ions/data/noaa_i18n.dat index 54d2588a5..aaaeca5fd 100644 --- a/dataengines/weather/ions/data/noaa_i18n.dat +++ b/dataengines/weather/ions/data/noaa_i18n.dat @@ -176,6 +176,7 @@ weather condition|Partly Cloudy weather condition|Partly Cloudy and Breezy weather condition|Partly Cloudy and Windy weather condition|Partly Cloudy with Haze +weather condition|Patchy Freezing Fog weather condition|Patches of Fog weather condition|Patches of Fog in Vicinity weather condition|Rain Fog From 65f3a9610f44896c007d1a78a7d955503a1081ef Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 5 Jan 2019 10:58:58 +0100 Subject: [PATCH 03/11] StatusItemNotifier: fix overlays by name with icons by name Summary: Setting an overlay by name results in a QIcon for it created; OTOH, this icon is never used to create the final image in case the main/attention icons are set by name too. Since KIconEngine supports overlays natively, directly pass the list of overlays (with just one element -- the overlay set) to it. As result, main/attention icons by name are created directly with the requested overlay by name. Test Plan: - builds fine - main/attention icon by name + overlay by name works now, showing the requested overlay - main/attention icon by name + overlay by pixmap still works as before - main/attention icon by pixmap is unaffected, no matter whether/which overlay is set - the system tray icons of juk, and amarok now have the play/pause overlays Reviewers: apol Reviewed By: apol Subscribers: davidedmundson, apol, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D17983 --- dataengines/statusnotifieritem/statusnotifieritemsource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataengines/statusnotifieritem/statusnotifieritemsource.cpp b/dataengines/statusnotifieritem/statusnotifieritemsource.cpp index 055bcd4aa..b14acd831 100644 --- a/dataengines/statusnotifieritem/statusnotifieritemsource.cpp +++ b/dataengines/statusnotifieritem/statusnotifieritemsource.cpp @@ -291,7 +291,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call) if (image.isEmpty()) { iconName = properties[QStringLiteral("IconName")].toString(); if (!iconName.isEmpty()) { - icon = QIcon(new KIconEngine(iconName, iconLoader())); + icon = QIcon(new KIconEngine(iconName, iconLoader(), overlayNames)); if (overlayNames.isEmpty() && !overlay.isNull()) { overlayIcon(&icon, &overlay); @@ -317,7 +317,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call) QString iconName = properties[QStringLiteral("AttentionIconName")].toString(); setData(QStringLiteral("AttentionIconName"), iconName); if (!iconName.isEmpty()) { - attentionIcon = QIcon(new KIconEngine(iconName, iconLoader())); + attentionIcon = QIcon(new KIconEngine(iconName, iconLoader(), overlayNames)); if (overlayNames.isEmpty() && !overlay.isNull()) { overlayIcon(&attentionIcon, &overlay); From 679aabe93c31c7307f7e0ffc2284c6cd80fa9d26 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Tue, 29 Jan 2019 09:05:18 +0100 Subject: [PATCH 04/11] SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- applets/batterymonitor/package/metadata.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/batterymonitor/package/metadata.desktop b/applets/batterymonitor/package/metadata.desktop index a7c9b6011..899cfa06f 100644 --- a/applets/batterymonitor/package/metadata.desktop +++ b/applets/batterymonitor/package/metadata.desktop @@ -16,7 +16,7 @@ Name[fr]=Batterie et luminosité Name[gl]=Batería e brillo Name[he]=סוללה ובהירות Name[hu]=Akkumulátor és fényerő -Name[id]=Battery and Brightness +Name[id]=Baterai dan Kecerahan Name[is]=Rafhlaða og skjábirta Name[it]=Batteria e luminosità Name[ja]=バッテリーと明るさ From 6b4e2500043b14ca3b74a14deef4e3693e273abe Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 29 Jan 2019 23:47:44 +0100 Subject: [PATCH 05/11] [weather dataengine] Remove duplicated condition/forecast strings GIT_SILENT (cherry picked from commit ad0f6834a29afd34d1432788a771f72d6d40cf90) --- dataengines/weather/ions/data/envcan_i18n.dat | 2 -- dataengines/weather/ions/data/noaa_i18n.dat | 8 -------- 2 files changed, 10 deletions(-) diff --git a/dataengines/weather/ions/data/envcan_i18n.dat b/dataengines/weather/ions/data/envcan_i18n.dat index 47381c69a..ee590393d 100644 --- a/dataengines/weather/ions/data/envcan_i18n.dat +++ b/dataengines/weather/ions/data/envcan_i18n.dat @@ -78,8 +78,6 @@ weather condition|Snow Crystals weather condition|Snow Grains weather condition|Squalls weather condition|Sunny -weather condition|Mainly Sunny -weather condition|Partly Cloudy weather condition|Thunderstorm with Hail weather condition|Thunderstorm with Rain weather condition|Thunderstorm with Sand or Dust Storm diff --git a/dataengines/weather/ions/data/noaa_i18n.dat b/dataengines/weather/ions/data/noaa_i18n.dat index aaaeca5fd..f605b375b 100644 --- a/dataengines/weather/ions/data/noaa_i18n.dat +++ b/dataengines/weather/ions/data/noaa_i18n.dat @@ -48,7 +48,6 @@ weather condition|Heavy Drizzle Fog weather condition|Heavy Drizzle Fog/Mist weather condition|Heavy Drizzle Ice Pellets weather condition|Heavy Drizzle Snow -weather condition|Heavy Drizzle Snow weather condition|Heavy Dust Storm weather condition|Heavy Freezing Drizzle weather condition|Heavy Freezing Drizzle Rain @@ -303,9 +302,6 @@ weather forecast|Slight Chance Snow Showers weather forecast|Chance Snow Showers weather forecast|Snow Showers Likely weather forecast|Snow Showers -weather forecast|Chance Snow Showers -weather forecast|Snow Showers Likely -weather forecast|Snow Showers weather forecast|Chance Drizzle weather forecast|Drizzle Likely weather forecast|Drizzle @@ -317,9 +313,6 @@ weather forecast|Heavy Rain weather forecast|Chance Rain Showers weather forecast|Rain Showers Likely weather forecast|Rain Showers -weather forecast|Chance Rain Showers -weather forecast|Rain Showers Likely -weather forecast|Rain Showers weather forecast|Sleet weather forecast|Smoke weather forecast|Freezing Fog @@ -350,5 +343,4 @@ weather forecast|Decreasing Clouds weather forecast|Becoming Sunny weather forecast|Clear weather forecast|Mostly Clear -weather forecast|Chance Thunderstorms weather forecast|Slight Chance Thunderstorms From 182ef20af6fbc3da48a8f43b83832621dc24ef72 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 29 Jan 2019 23:50:20 +0100 Subject: [PATCH 06/11] weather dataengine] noaa: support more "Slight Chance *" forecast strings --- dataengines/weather/ions/data/noaa_i18n.dat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dataengines/weather/ions/data/noaa_i18n.dat b/dataengines/weather/ions/data/noaa_i18n.dat index f605b375b..c56303795 100644 --- a/dataengines/weather/ions/data/noaa_i18n.dat +++ b/dataengines/weather/ions/data/noaa_i18n.dat @@ -267,26 +267,33 @@ weather forecast|Volcanic Ash weather forecast|Water Spout weather forecast|Freezing Spray weather forecast|Frost +weather forecast|Slight Chance Thunderstorms weather forecast|Chance Thunderstorms weather forecast|Thunderstorms Likely weather forecast|Thunderstorms weather forecast|Severe Tstms +weather forecast|Slight Chance Snow/Sleet weather forecast|Chance Snow/Sleet weather forecast|Snow/Sleet Likely weather forecast|Snow/Sleet +weather forecast|Slight Chance Rain/Sleet weather forecast|Chance Rain/Sleet weather forecast|Rain/Sleet Likely weather forecast|Rain/Sleet +weather forecast|Slight Chance Rain/Freezing Rain weather forecast|Chance Rain/Freezing Rain weather forecast|Rain/Freezing Rain Likely weather forecast|Rain/Freezing Rain weather forecast|Wintry Mix +weather forecast|Slight Chance Freezing Drizzle weather forecast|Chance Freezing Drizzle weather forecast|Freezing Drizzle Likely weather forecast|Freezing Drizzle +weather forecast|Slight Chance Freezing Rain weather forecast|Chance Freezing Rain weather forecast|Freezing Rain Likely weather forecast|Freezing Rain +weather forecast|Slight Chance Rain/Snow weather forecast|Chance Rain/Snow weather forecast|Rain/Snow Likely weather forecast|Rain/Snow @@ -295,6 +302,7 @@ weather forecast|Chance Snow weather forecast|Snow Likely weather forecast|Snow weather forecast|Heavy Snow +weather forecast|Slight Chance Flurries weather forecast|Chance Flurries weather forecast|Flurries Likely weather forecast|Flurries @@ -302,6 +310,7 @@ weather forecast|Slight Chance Snow Showers weather forecast|Chance Snow Showers weather forecast|Snow Showers Likely weather forecast|Snow Showers +weather forecast|Slight Chance Drizzle weather forecast|Chance Drizzle weather forecast|Drizzle Likely weather forecast|Drizzle @@ -310,6 +319,7 @@ weather forecast|Chance Rain weather forecast|Rain Likely weather forecast|Rain weather forecast|Heavy Rain +weather forecast|Slight Chance Rain Showers weather forecast|Chance Rain Showers weather forecast|Rain Showers Likely weather forecast|Rain Showers @@ -343,4 +353,3 @@ weather forecast|Decreasing Clouds weather forecast|Becoming Sunny weather forecast|Clear weather forecast|Mostly Clear -weather forecast|Slight Chance Thunderstorms From ddde180ae922267e410ff1f1d3b0a6adc8e801df Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Thu, 31 Jan 2019 13:44:44 +0100 Subject: [PATCH 07/11] [plasmawindowed] Pick up KQuickAddons::QtQuickSettings Summary: If having the need to use those settings with something else than the default, one also expects the utils to follow those custom settings. Reviewers: #plasma, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D18625 --- plasma-windowed/CMakeLists.txt | 1 + plasma-windowed/main.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plasma-windowed/CMakeLists.txt b/plasma-windowed/CMakeLists.txt index 867cdc7e9..d19e276d8 100644 --- a/plasma-windowed/CMakeLists.txt +++ b/plasma-windowed/CMakeLists.txt @@ -14,6 +14,7 @@ target_link_libraries( KF5::I18n KF5::IconThemes KF5::XmlGui + KF5::QuickAddons KF5::PlasmaQuick KF5::Plasma KF5::DBusAddons diff --git a/plasma-windowed/main.cpp b/plasma-windowed/main.cpp index abc126e09..0067538a2 100644 --- a/plasma-windowed/main.cpp +++ b/plasma-windowed/main.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -41,6 +42,8 @@ int main(int argc, char **argv) KDBusService service(KDBusService::Unique); + KQuickAddons::QtQuickSettings::init(); + QCommandLineParser parser; parser.setApplicationDescription(i18n("Plasma Windowed")); parser.addOption(QCommandLineOption(QStringLiteral("statusnotifier"), i18n("Makes the plasmoid stay alive in the Notification Area, even when the window is closed."))); From 3431ea6dd1d26419e4c579c8c242c29095220edd Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 1 Feb 2019 15:14:22 +0100 Subject: [PATCH 08/11] [kio_applications] Fix last dir item being shown twice Summary: During porting to the new KIO::SlaveBase::listEntry() API accidentally the listEntry(entry, true) was turned into a listEntry(), where it should have been just removed in favour of an existing finished() call. See 0853202b0cfb688add4f021708830710e1b84931 Test Plan: applications: and programs: no longer show the last entry twice Reviewers: #plasma, chinmoyr Reviewed By: chinmoyr Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D18641 --- kioslave/applications/kio_applications.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/kioslave/applications/kio_applications.cpp b/kioslave/applications/kio_applications.cpp index 9b9c37a8c..065e20c81 100644 --- a/kioslave/applications/kio_applications.cpp +++ b/kioslave/applications/kio_applications.cpp @@ -193,6 +193,5 @@ void ApplicationsProtocol::listDir(const QUrl& url) } totalSize(count); - listEntry(entry); finished(); } From ed7c5796ebdc57082fee51dd65befbc6484c520c Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 6 Feb 2019 02:23:59 +0100 Subject: [PATCH 09/11] weather dataengine] noaa: another forecast string found in use --- dataengines/weather/ions/data/noaa_i18n.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/dataengines/weather/ions/data/noaa_i18n.dat b/dataengines/weather/ions/data/noaa_i18n.dat index c56303795..2a6d18241 100644 --- a/dataengines/weather/ions/data/noaa_i18n.dat +++ b/dataengines/weather/ions/data/noaa_i18n.dat @@ -284,6 +284,7 @@ weather forecast|Slight Chance Rain/Freezing Rain weather forecast|Chance Rain/Freezing Rain weather forecast|Rain/Freezing Rain Likely weather forecast|Rain/Freezing Rain +weather forecast|Wintry Mix Likely weather forecast|Wintry Mix weather forecast|Slight Chance Freezing Drizzle weather forecast|Chance Freezing Drizzle From 28d0af6791a91eeba7c76721926d18d88bf0b99f Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sun, 10 Feb 2019 02:36:45 +0100 Subject: [PATCH 10/11] [weather dataengine] envcan: fix forecast icons to match "ice pellets" Complements the same done before for the translation terms in c5414f0d31f9c6dff783542ec6ed56960b629372 --- dataengines/weather/ions/envcan/ion_envcan.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dataengines/weather/ions/envcan/ion_envcan.cpp b/dataengines/weather/ions/envcan/ion_envcan.cpp index 1d6aa1ceb..81ab2703e 100644 --- a/dataengines/weather/ions/envcan/ion_envcan.cpp +++ b/dataengines/weather/ions/envcan/ion_envcan.cpp @@ -245,10 +245,10 @@ QMap EnvCanadaIon::setupForecastIconMappi { QStringLiteral("ice fog"), Mist }, { QStringLiteral("ice fog developing"), Mist }, { QStringLiteral("ice fog dissipating"), Mist }, - { QStringLiteral("ice pellet"), Hail }, - { QStringLiteral("ice pellet mixed with freezing rain"), Hail }, - { QStringLiteral("ice pellet mixed with snow"), Hail }, - { QStringLiteral("ice pellet or snow"), RainSnow }, + { QStringLiteral("ice pellets"), Hail }, + { QStringLiteral("ice pellets mixed with freezing rain"), Hail }, + { QStringLiteral("ice pellets mixed with snow"), Hail }, + { QStringLiteral("ice pellets or snow"), RainSnow }, { QStringLiteral("light snow"), LightSnow }, { QStringLiteral("light snow and blizzard"), LightSnow }, { QStringLiteral("light snow and blizzard and blowing snow"), Snow }, @@ -280,11 +280,11 @@ QMap EnvCanadaIon::setupForecastIconMappi { QStringLiteral("periods of freezing rain or ice pellets"), FreezingRain }, { QStringLiteral("periods of freezing rain or rain"), FreezingRain }, { QStringLiteral("periods of freezing rain or snow"), FreezingRain }, - { QStringLiteral("periods of ice pellet"), Hail }, - { QStringLiteral("periods of ice pellet mixed with freezing rain"), Hail }, - { QStringLiteral("periods of ice pellet mixed with snow"), Hail }, - { QStringLiteral("periods of ice pellet or freezing rain"), Hail }, - { QStringLiteral("periods of ice pellet or snow"), Hail }, + { QStringLiteral("periods of ice pellets"), Hail }, + { QStringLiteral("periods of ice pellets mixed with freezing rain"), Hail }, + { QStringLiteral("periods of ice pellets mixed with snow"), Hail }, + { QStringLiteral("periods of ice pellets or freezing rain"), Hail }, + { QStringLiteral("periods of ice pellets or snow"), Hail }, { QStringLiteral("periods of light snow"), LightSnow }, { QStringLiteral("periods of light snow and blizzard"), Snow }, { QStringLiteral("periods of light snow and blizzard and blowing snow"), Snow }, From 03e13b10d877733528d75f20a3f1d706088f7b9b Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sun, 10 Feb 2019 04:33:46 +0100 Subject: [PATCH 11/11] [weather dataengine] bbc,envcan,noaa: fix day/night calculation for observe "time" engine ignores the timezone in the passed DateTime variable, only looks at the one given in the first argument --- dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp | 3 ++- dataengines/weather/ions/envcan/ion_envcan.cpp | 3 ++- dataengines/weather/ions/noaa/ion_noaa.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp b/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp index 2a59e8b55..02e89b26f 100644 --- a/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp +++ b/dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp @@ -747,7 +747,8 @@ bool UKMETIon::readObservationXMLData(const QString& source, QXmlStreamReader& x (data.observationDateTime.isValid() && (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); if (canCalculateElevation) { - data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") + data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4") + .arg(QString::fromUtf8(data.observationDateTime.timeZone().id())) .arg(data.stationLatitude) .arg(data.stationLongitude) .arg(data.observationDateTime.toString(Qt::ISODate)); diff --git a/dataengines/weather/ions/envcan/ion_envcan.cpp b/dataengines/weather/ions/envcan/ion_envcan.cpp index 81ab2703e..78001c220 100644 --- a/dataengines/weather/ions/envcan/ion_envcan.cpp +++ b/dataengines/weather/ions/envcan/ion_envcan.cpp @@ -739,7 +739,8 @@ bool EnvCanadaIon::readXMLData(const QString& source, QXmlStreamReader& xml) (data.observationDateTime.isValid() && (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); if (canCalculateElevation) { - data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") + data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4") + .arg(QString::fromUtf8(data.observationDateTime.timeZone().id())) .arg(data.stationLatitude) .arg(data.stationLongitude) .arg(data.observationDateTime.toString(Qt::ISODate)); diff --git a/dataengines/weather/ions/noaa/ion_noaa.cpp b/dataengines/weather/ions/noaa/ion_noaa.cpp index bdd7dba90..fa77fd611 100644 --- a/dataengines/weather/ions/noaa/ion_noaa.cpp +++ b/dataengines/weather/ions/noaa/ion_noaa.cpp @@ -491,7 +491,8 @@ bool NOAAIon::readXMLData(const QString& source, QXmlStreamReader& xml) (data.observationDateTime.isValid() && (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); if (canCalculateElevation) { - data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") + data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4") + .arg(QString::fromUtf8(data.observationDateTime.timeZone().id())) .arg(data.stationLatitude) .arg(data.stationLongitude) .arg(data.observationDateTime.toString(Qt::ISODate));