Bug 462707

Summary: Hide swap sensors when swap is not available
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: System Monitor widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: ahiemstra, nate, notmart
Priority: NOR    
Version First Reported In: 5.26.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2022-12-06 13:27:39 UTC
Created attachment 154359 [details]
screenshot

SUMMARY
My system does not have swap, but the swap sensors are available for selection in the settings of System Monitor widgets anyway.

STEPS TO REPRODUCE
0. use a system without swap
1. open the settings of a System Monitor widget
2. click on 'Sensors Details' section
3. click to add a sensor
4. click on 'Memory'

OBSERVED RESULT
swap sensors are available under 'Swap memory' category. Please see the attached screenshot.

EXPECTED RESULT
Hide swap sensors when the system does not have swap

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Graphics Platform: Wayland