Package: release.debian.org Severity: normal X-Debbugs-Cc: kinfocen...@packages.debian.org, Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Control: affects -1 + src:kinfocenter User: release.debian....@packages.debian.org Usertags: unblock
Dear Release Team, please unblock package kinfocenter. [ Reason ] It contains the following changes : * New upstream release (6.3.6). - Fix strange horizontal scrolling in applications view that makes no sense. (kde#502948) * Backport upstream commits: - Fix total amount of memory in system information. [f44af69b] (kde#500412) - Make UI for energy history graph more stable. [2067b2ab] (kde#490239) [ Tests ] Fix for reproducible issues have been successfully tested locally. No regression spotted. [ Risks ] Only contains the latest point release for the 6.3 Plasma branch and backported commits. Further fixes can easily be backported or the changes reverted. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing Thanks ! unblock kinfocenter/4:6.3.6-1
diff -Nru kinfocenter-6.3.5/CMakeLists.txt kinfocenter-6.3.6/CMakeLists.txt --- kinfocenter-6.3.5/CMakeLists.txt 2025-05-06 19:56:44.000000000 +0200 +++ kinfocenter-6.3.6/CMakeLists.txt 2025-07-08 13:44:06.000000000 +0200 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(kinfocenter) -set(PROJECT_VERSION "6.3.5") +set(PROJECT_VERSION "6.3.6") set(QT_MIN_VERSION "6.7.0") diff -Nru kinfocenter-6.3.5/debian/changelog kinfocenter-6.3.6/debian/changelog --- kinfocenter-6.3.5/debian/changelog 2025-05-21 09:43:06.000000000 +0200 +++ kinfocenter-6.3.6/debian/changelog 2025-07-15 13:57:45.000000000 +0200 @@ -1,3 +1,16 @@ +kinfocenter (4:6.3.6-1) unstable; urgency=medium + + [ Aurélien COUDERC ] + * New upstream release (6.3.6). + - Fix strange horizontal scrolling in applications view that makes no + sense. (kde#502948) + * Backport upstream commits: + - Fix total amount of memory in system information. [f44af69b] + (kde#500412) + - Make UI for energy history graph more stable. [2067b2ab] (kde#490239) + + -- Aurélien COUDERC <couc...@debian.org> Tue, 15 Jul 2025 13:57:45 +0200 + kinfocenter (4:6.3.5-1) unstable; urgency=medium [ Aurélien COUDERC ] diff -Nru kinfocenter-6.3.5/debian/patches/series kinfocenter-6.3.6/debian/patches/series --- kinfocenter-6.3.5/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ kinfocenter-6.3.6/debian/patches/series 2025-07-15 13:57:38.000000000 +0200 @@ -0,0 +1,2 @@ +upstream_f44af69b_kcms-about-distro-Add-help-property-to-Entry-show-total-amount-of-installed-memory-in-MemoryEntry.patch +upstream_2067b2ab_kcms-energy-More-stable-UI-for-history-graph.patch diff -Nru kinfocenter-6.3.5/debian/patches/upstream_2067b2ab_kcms-energy-More-stable-UI-for-history-graph.patch kinfocenter-6.3.6/debian/patches/upstream_2067b2ab_kcms-energy-More-stable-UI-for-history-graph.patch --- kinfocenter-6.3.5/debian/patches/upstream_2067b2ab_kcms-energy-More-stable-UI-for-history-graph.patch 1970-01-01 01:00:00.000000000 +0100 +++ kinfocenter-6.3.6/debian/patches/upstream_2067b2ab_kcms-energy-More-stable-UI-for-history-graph.patch 2025-07-15 13:57:38.000000000 +0200 @@ -0,0 +1,144 @@ +From 2067b2abf6f22ddc5fa1b4edc75f9add0e8b5de7 Mon Sep 17 00:00:00 2001 +From: Ismael Asensio <isma...@gmail.com> +Date: Thu, 30 Jan 2025 21:20:32 +0100 +Subject: [PATCH] kcms/energy: More stable UI for history graph + +For devices that have history data available, always show the graph. +If there are no data points for the selected time range, simply show +a placeholder message instead of hiding it. + +On the other hand, always hide the graph and options for those devices +that cannot provide a history, removing also the potentially confusing +warning message + +This moves away from having an annoyingly jumping an unclear UI. + +BUG: 490239 +FIXED-IN: 6.4 +--- + kcms/energy/ui/Graph.qml | 38 ++++++++++++++++++++------------------ + kcms/energy/ui/main.qml | 35 +++++++++++++++++------------------ + 2 files changed, 37 insertions(+), 36 deletions(-) + +diff --git a/kcms/energy/ui/Graph.qml b/kcms/energy/ui/Graph.qml +index 66f7a861..75c9224a 100644 +--- a/kcms/energy/ui/Graph.qml ++++ b/kcms/energy/ui/Graph.qml +@@ -93,31 +93,33 @@ Canvas + var currentUnixTime = Date.now() + var xMinUnixTime = currentUnixTime - xDuration * 1000 + +- // Draw the line graph + c.beginPath(); + +- var index = 0 ++ // Draw the line graph if we have enough points ++ if (data.length >= 2) { ++ var index = 0 + +- while ((index < data.length - 1) && (data[index].x < (xMinUnixTime / 1000))) { +- index++ +- } ++ while ((index < data.length - 1) && (data[index].x < (xMinUnixTime / 1000))) { ++ index++ ++ } + +- var firstPoint = scalePoint(data[index], currentUnixTime) +- c.moveTo(firstPoint.x, firstPoint.y) ++ var firstPoint = scalePoint(data[index], currentUnixTime) ++ c.moveTo(firstPoint.x, firstPoint.y) + +- var point +- for (var i = index + 1; i < data.length; i++) { +- if (data[i].x > (xMinUnixTime / 1000)) { +- point = scalePoint(data[i], currentUnixTime) +- c.lineTo(point.x, point.y) ++ var point ++ for (var i = index + 1; i < data.length; i++) { ++ if (data[i].x > (xMinUnixTime / 1000)) { ++ point = scalePoint(data[i], currentUnixTime) ++ c.lineTo(point.x, point.y) ++ } + } ++ ++ c.stroke(); ++ c.strokeStyle = 'rgba(0, 0, 0, 0)'; ++ c.lineTo(point.x, height - yPadding); ++ c.lineTo(firstPoint.x, height - yPadding); ++ c.fill(); + } +- +- c.stroke(); +- c.strokeStyle = 'rgba(0, 0, 0, 0)'; +- c.lineTo(point.x, height - yPadding); +- c.lineTo(firstPoint.x, height - yPadding); +- c.fill(); + + c.closePath() + +diff --git a/kcms/energy/ui/main.qml b/kcms/energy/ui/main.qml +index e8670130..ba71ba77 100644 +--- a/kcms/energy/ui/main.qml ++++ b/kcms/energy/ui/main.qml +@@ -238,18 +238,17 @@ KCM.SimpleKCM { + } + } + ++ HistoryModel { ++ id: history ++ duration: timespanComboDurations[timespanCombo.currentIndex] ++ device: currentUdi ++ type: root.historyType ++ } ++ + ColumnLayout { + Layout.fillWidth: true + spacing: Kirigami.Units.smallSpacing +- visible: !!currentBattery +- +- +- HistoryModel { +- id: history +- duration: timespanComboDurations[timespanCombo.currentIndex] +- device: currentUdi +- type: root.historyType +- } ++ visible: !!currentBattery && history.available + + Graph { + id: graph +@@ -291,7 +290,15 @@ KCM.SimpleKCM { + } + } + yStep: root.historyType == HistoryModel.RateType ? 10 : 20 +- visible: history.count > 1 ++ } ++ ++ // Reparented to keep the item outside of a layout and the graph canvas ++ Kirigami.PlaceholderMessage { ++ parent: graph ++ anchors.centerIn: parent ++ visible: graph.data.length < 2 ++ width: parent.width - (Kirigami.Units.largeSpacing * 4) ++ text: i18nc("@info:status", "No history information for this time span") + } + + GridLayout { +@@ -343,14 +350,6 @@ KCM.SimpleKCM { + onClicked: history.refresh() + } + } +- +- Kirigami.InlineMessage { +- Layout.fillWidth: true +- Layout.topMargin: Kirigami.Units.smallSpacing +- showCloseButton: true +- text: i18n("This type of history is currently not available for this device.") +- visible: !graph.visible +- } + } + + ColumnLayout { +-- +GitLab + diff -Nru kinfocenter-6.3.5/debian/patches/upstream_f44af69b_kcms-about-distro-Add-help-property-to-Entry-show-total-amount-of-installed-memory-in-MemoryEntry.patch kinfocenter-6.3.6/debian/patches/upstream_f44af69b_kcms-about-distro-Add-help-property-to-Entry-show-total-amount-of-installed-memory-in-MemoryEntry.patch --- kinfocenter-6.3.5/debian/patches/upstream_f44af69b_kcms-about-distro-Add-help-property-to-Entry-show-total-amount-of-installed-memory-in-MemoryEntry.patch 1970-01-01 01:00:00.000000000 +0100 +++ kinfocenter-6.3.6/debian/patches/upstream_f44af69b_kcms-about-distro-Add-help-property-to-Entry-show-total-amount-of-installed-memory-in-MemoryEntry.patch 2025-07-15 08:10:45.000000000 +0200 @@ -0,0 +1,294 @@ +From f44af69b07ed19d076819fe4cc84e5777747d957 Mon Sep 17 00:00:00 2001 +From: Oliver Beard <olib...@outlook.com> +Date: Thu, 20 Feb 2025 22:43:47 +0000 +Subject: [PATCH] kcms/about-distro: Add help property to Entry & show total + amount of installed memory in MemoryEntry This provides additional + information to the user, with a new help tooltip that clarifies the displayed + values as is contextually appropriate. For example, if the shown message is + "32 GB of RAM (31.3 GB usable)", the tooltip will elucidate that some memory + is reserved for use by system hardware. BUG: 500412 + +--- + CMakeLists.txt | 4 + + kcms/about-distro/src/CMakeLists.txt | 5 + + kcms/about-distro/src/Entry.cpp | 5 + + kcms/about-distro/src/Entry.h | 3 + + kcms/about-distro/src/MemoryEntry.cpp | 144 +++++++++++++++++++++++--- + kcms/about-distro/src/MemoryEntry.h | 9 +- + kcms/about-distro/src/ui/main.qml | 5 + + 7 files changed, 157 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51f94078..e3005878 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,10 @@ find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS + find_package(PkgConfig) + pkg_check_modules(libdrm REQUIRED IMPORTED_TARGET libdrm) + ++if(CMAKE_SYSTEM_NAME MATCHES "Linux") ++ find_package(UDev REQUIRED COMPONENTS UDev) ++endif() ++ + ecm_find_qmlmodule(org.kde.kirigami 2.5) + + macro(kinfocenter_add_kcm target) +diff --git a/kcms/about-distro/src/CMakeLists.txt b/kcms/about-distro/src/CMakeLists.txt +index 13ad8d0a..d731d81a 100644 +--- a/kcms/about-distro/src/CMakeLists.txt ++++ b/kcms/about-distro/src/CMakeLists.txt +@@ -43,6 +43,11 @@ target_link_libraries(kcm_about-distro PRIVATE + PkgConfig::libdrm + ) + ++if(UDev_FOUND) ++ target_link_libraries(kcm_about-distro PRIVATE UDev::UDev) ++ target_compile_definitions(kcm_about-distro PRIVATE UDEV_FOUND) ++endif() ++ + cmake_path(RELATIVE_PATH KDE_INSTALL_FULL_LIBEXECDIR BASE_DIRECTORY "${KDE_INSTALL_FULL_PLUGINDIR}/plasma/kcms/" OUTPUT_VARIABLE LIBEXECDIR_FROM_KCM) + + target_compile_options( +diff --git a/kcms/about-distro/src/Entry.cpp b/kcms/about-distro/src/Entry.cpp +index a4077efd..63dc71fb 100644 +--- a/kcms/about-distro/src/Entry.cpp ++++ b/kcms/about-distro/src/Entry.cpp +@@ -82,4 +82,9 @@ Hint Entry::localizedHint(Language) const + return {}; + } + ++QString Entry::localizedHelp(Language) const ++{ ++ return {}; ++} ++ + #include "moc_Entry.cpp" +diff --git a/kcms/about-distro/src/Entry.h b/kcms/about-distro/src/Entry.h +index e5c3f6f1..bc053a4f 100644 +--- a/kcms/about-distro/src/Entry.h ++++ b/kcms/about-distro/src/Entry.h +@@ -78,6 +78,9 @@ public: + // Returns a hint for the user to consider when interpreting the value. + Q_INVOKABLE [[nodiscard]] virtual Hint localizedHint(Language language = Language::System) const; + ++ // Returns a help string for the entry, shown with a ContextualHelpButton ++ Q_SCRIPTABLE [[nodiscard]] virtual QString localizedHelp(Language language = Language::System) const; ++ + protected: + // Returns localized QString for the given language. + QString localize(const KLocalizedString &string, Language language) const; +diff --git a/kcms/about-distro/src/MemoryEntry.cpp b/kcms/about-distro/src/MemoryEntry.cpp +index 1baaea2a..b58b5523 100644 +--- a/kcms/about-distro/src/MemoryEntry.cpp ++++ b/kcms/about-distro/src/MemoryEntry.cpp +@@ -9,6 +9,9 @@ + + #ifdef Q_OS_LINUX + #include <sys/sysinfo.h> ++#ifdef UDEV_FOUND ++#include <libudev.h> ++#endif + #elif defined(Q_OS_FREEBSD) + // clang-format off + #include <sys/types.h> +@@ -21,34 +24,141 @@ MemoryEntry::MemoryEntry() + { + } + +-qlonglong MemoryEntry::calculateTotalRam() ++std::optional<qlonglong> MemoryEntry::calculateTotalRam() ++{ ++#if defined(Q_OS_LINUX) && defined(UDEV_FOUND) ++ std::unique_ptr<struct udev, decltype(&udev_unref)> udev(udev_new(), &udev_unref); ++ if (!udev) { ++ return {}; ++ } ++ ++ std::unique_ptr<struct udev_device, decltype(&udev_device_unref)> dmi(udev_device_new_from_syspath(udev.get(), "/sys/class/dmi/id/"), &udev_device_unref); ++ if (!dmi) { ++ return {}; ++ } ++ ++ const char *numMemoryDevicesCStr = udev_device_get_property_value(dmi.get(), "MEMORY_ARRAY_NUM_DEVICES"); ++ if (!numMemoryDevicesCStr) { ++ return {}; ++ } ++ ++ bool ok; ++ int numMemoryDevices = QByteArray(numMemoryDevicesCStr).toInt(&ok); ++ if (!ok) { ++ return {}; ++ } ++ ++ qlonglong totalBytes = 0; ++ for (int i = 0; i < numMemoryDevices; ++i) { ++ const char *memoryBytesCStr = udev_device_get_property_value(dmi.get(), QStringLiteral("MEMORY_DEVICE_%1_SIZE").arg(i).toLatin1()); ++ qlonglong memoryBytes = QByteArray(memoryBytesCStr).toLongLong(&ok); ++ if (ok) { ++ totalBytes += memoryBytes; ++ } ++ } ++ ++ return totalBytes; ++#endif ++ ++ /* ++ * TODO: A FreeBSD impl is likely possible, but it appears that ++ * sysctlbyname() cannot get what we want with either "hw.physmem", ++ * "hw.usermem" or "hw.realmem". ++ * On a system with 2 x 4 GiB memory modules installed, we would need ++ * to return a value of 8 GiB in bytes. ++ */ ++ ++ return {}; ++} ++ ++std::optional<qlonglong> MemoryEntry::calculateAvailableRam() + { +- qlonglong ret = -1; + #ifdef Q_OS_LINUX + struct sysinfo info; +- if (sysinfo(&info) == 0) +- // manpage "sizes are given as multiples of mem_unit bytes" +- ret = qlonglong(info.totalram) * info.mem_unit; ++ if (sysinfo(&info) == 0) { ++ // manpage: "sizes are given as multiples of mem_unit bytes" ++ return qlonglong(info.totalram) * info.mem_unit; ++ } + #elif defined(Q_OS_FREEBSD) + /* Stuff for sysctl */ +- size_t len; +- + unsigned long memory; +- len = sizeof(memory); +- sysctlbyname("hw.physmem", &memory, &len, NULL, 0); +- +- ret = memory; ++ size_t len = sizeof(memory); ++ if (sysctlbyname("hw.physmem", &memory, &len, NULL, 0) == 0) { ++ return memory; ++ } + #endif +- return ret; ++ ++ return {}; + } + + QString MemoryEntry::localizedValue(Language language) const + { +- const qlonglong totalRam = calculateTotalRam(); +- if (totalRam > 0) { +- const auto string = ki18nc("@label %1 is the formatted amount of system memory (e.g. 7,7 GiB)", "%1 of RAM") +- .subs(KFormat(localeForLanguage(language)).formatByteSize(totalRam)); ++ auto precisionForGiB = [](std::optional<qlonglong> bytes) -> int { ++ if (!bytes.has_value()) { ++ return 0; ++ } ++ ++ constexpr qlonglong GiB = 1024 * 1024 * 1024; ++ return (bytes.value() % GiB == 0) ? 0 : 1; ++ }; ++ ++ const int totalRamPrecision = precisionForGiB(m_totalRam); ++ const int availableRamPrecision = precisionForGiB(m_availableRam); ++ ++ if (m_totalRam.has_value() && m_availableRam.has_value()) { ++ // Both known ++ const auto string = ki18nc("@label, %1 is the total amount of installed system memory, %2 is the amount of which is usable, both expressed as 7.7 GiB", ++ "%1 of RAM (%2 usable)") ++ .subs(KFormat(localeForLanguage(language)).formatByteSize(m_totalRam.value(), totalRamPrecision)) ++ .subs(KFormat(localeForLanguage(language)).formatByteSize(m_availableRam.value(), availableRamPrecision)); ++ return localize(string, language); ++ } ++ ++ if (m_totalRam.has_value() && !m_availableRam.has_value()) { ++ // Known total, unknown available ++ const auto string = ki18nc("@label, %1 is the amount of installed system memory expressed as 7.7 GiB", "%1 of RAM") ++ .subs(KFormat(localeForLanguage(language)).formatByteSize(m_totalRam.value(), totalRamPrecision)); ++ return localize(string, language); ++ } ++ ++ if (!m_totalRam.has_value() && m_availableRam.has_value()) { ++ // Unknown total, known available ++ const auto string = ki18nc("@label, %1 is the amount of usable system memory expressed as 7.7 GiB", "%1 of usable RAM") ++ .subs(KFormat(localeForLanguage(language)).formatByteSize(m_availableRam.value(), availableRamPrecision)); + return localize(string, language); + } +- return localize(ki18nc("Unknown amount of RAM", "Unknown"), language); ++ ++ // Both unknown ++ return localize(ki18nc("@label, Unknown amount of system memory", "Unknown"), language); ++} ++ ++QString MemoryEntry::localizedHelp(Language language) const ++{ ++ if (m_totalRam.has_value() && m_availableRam.has_value()) { ++ // Both known ++ return localize(ki18nc("@info:tooltip, referring to system memory or RAM", ++ "Some memory is reserved for use by the kernel or system hardware such as integrated graphics memory."), ++ language); ++ } ++ ++ if (m_totalRam.has_value() && !m_availableRam.has_value()) { ++ // Known total, unknown available ++ return localize( ++ ki18nc("@info:tooltip, referring to system memory or RAM", ++ "The amount of usable memory may be lower than the displayed amount because some memory is reserved for use by the kernel or system " ++ "hardware, such as integrated graphics memory."), ++ language); ++ } ++ ++ if (!m_totalRam.has_value() && m_availableRam.has_value()) { ++ // Unknown total, known available ++ return localize( ++ ki18nc("@info:tooltip, referring to system memory or RAM", ++ "The amount of memory displayed may be lower than the installed amount because some memory is reserved for use by the kernel or system " ++ "hardware, such as integrated graphics memory."), ++ language); ++ } ++ ++ // Both unknown ++ return QString(); + } +diff --git a/kcms/about-distro/src/MemoryEntry.h b/kcms/about-distro/src/MemoryEntry.h +index 43beb2e8..d0757651 100644 +--- a/kcms/about-distro/src/MemoryEntry.h ++++ b/kcms/about-distro/src/MemoryEntry.h +@@ -12,10 +12,17 @@ class MemoryEntry : public Entry + { + public: + MemoryEntry(); +- static qlonglong calculateTotalRam(); + + // Overwrite to get correct localization for the value. + QString localizedValue(Language language = Language::System) const final; ++ QString localizedHelp(Language language = Language::System) const final; ++ ++private: ++ static std::optional<qlonglong> calculateTotalRam(); ++ static std::optional<qlonglong> calculateAvailableRam(); ++ ++ std::optional<qlonglong> m_totalRam = calculateTotalRam(); ++ std::optional<qlonglong> m_availableRam = calculateAvailableRam(); + }; + + #endif // MEMORYENTRY_H +diff --git a/kcms/about-distro/src/ui/main.qml b/kcms/about-distro/src/ui/main.qml +index 80fbc2c1..e80b7fe9 100644 +--- a/kcms/about-distro/src/ui/main.qml ++++ b/kcms/about-distro/src/ui/main.qml +@@ -167,6 +167,11 @@ KCMUtils.SimpleKCM { + } + } + ++ Kirigami.ContextualHelpButton { ++ visible: toolTipText.length > 0 ++ toolTipText: entry.localizedHelp() ++ } ++ + QQC2.Button { + visible: hidden + property var dialog: null +-- +GitLab + diff -Nru kinfocenter-6.3.5/kcms/audio_information/ui/main.qml kinfocenter-6.3.6/kcms/audio_information/ui/main.qml --- kinfocenter-6.3.5/kcms/audio_information/ui/main.qml 2025-05-06 19:56:44.000000000 +0200 +++ kinfocenter-6.3.6/kcms/audio_information/ui/main.qml 2025-07-08 13:44:06.000000000 +0200 @@ -11,4 +11,5 @@ KInfoCenter.CommandOutputKCM { output: kcm.infoOutputContext -} \ Pas de fin de ligne à la fin du fichier + wrapMode: TextEdit.Wrap +} diff -Nru kinfocenter-6.3.5/org.kde.kinfocenter.appdata.xml kinfocenter-6.3.6/org.kde.kinfocenter.appdata.xml --- kinfocenter-6.3.5/org.kde.kinfocenter.appdata.xml 2025-05-06 19:56:44.000000000 +0200 +++ kinfocenter-6.3.6/org.kde.kinfocenter.appdata.xml 2025-07-08 13:44:06.000000000 +0200 @@ -225,9 +225,9 @@ </provides> <project_group>KDE</project_group> <releases> + <release version="6.3.6" date="2025-07-08"/> <release version="6.3.5" date="2025-05-06"/> <release version="6.3.4" date="2025-04-01"/> <release version="6.3.3" date="2025-03-11"/> - <release version="6.3.2" date="2025-02-25"/> </releases> </component> diff -Nru kinfocenter-6.3.5/src/qml/CommandOutputKCM.qml kinfocenter-6.3.6/src/qml/CommandOutputKCM.qml --- kinfocenter-6.3.5/src/qml/CommandOutputKCM.qml 2025-05-06 19:56:44.000000000 +0200 +++ kinfocenter-6.3.6/src/qml/CommandOutputKCM.qml 2025-07-08 13:44:06.000000000 +0200 @@ -29,6 +29,8 @@ property int wrapMode: TextEdit.NoWrap property int textFormat: output.textFormat + flickable.contentWidth: wrapMode === TextEdit.NoWrap ? contentLoader.implicitWidth : undefined + Clipboard { id: clipboard } Component {