Bug 380355 - Processors numbers listed are machine-sorted, not human-sorted in Device Viewer
Summary: Processors numbers listed are machine-sorted, not human-sorted in Device Viewer
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Unclassified
Component: Device Viewer (show other bugs)
Version: 5.10.0
Platform: Neon Packages Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: David Hubner
URL:
Keywords: junior-jobs
: 395710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-30 14:03 UTC by Stefan Süss
Modified: 2018-06-27 20:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Süss 2017-05-30 14:03:22 UTC
Processors numbers listed are machine-sorted, not human-sorted

Processor 0
Processor 1
Processor 10
Processor 11
Processor 2
Processor ....

KDE Plasma Version 5.10.0
KDE Framework Version 5.24.0
Qt Version 5.7.1
Kernel Version: 4.8.0-53-generic

basically the KDE neon user edition
Comment 1 Sujith Shivaprakash 2017-07-15 21:03:12 UTC
Greetings, 

My name is Sujith, I am new to KDE, I am not sure where to start from, like where to find the source code and how to go about making changes, can someone here please walk me through this.


Thanks
Sujith
Comment 2 Christoph Feck 2017-07-26 18:32:50 UTC
You can find KDE sources on cgit.kde.org
Comment 3 Isaac True 2017-08-05 18:04:36 UTC
I've uploaded a diff which implements sorting of the device tree items: https://phabricator.kde.org/D7155
Comment 4 Christoph Feck 2018-06-21 23:05:20 UTC
*** Bug 395710 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2018-06-27 20:24:06 UTC
Git commit 7c0f85162ee978753e7bbe726455b7388023afb6 by Christoph Feck, on behalf of Isaac True.
Committed on 27/06/2018 at 20:21.
Pushed by cfeck into branch 'master'.

Implement sorting of the device tree items

This patch fixes the issue of processor numbers not being sorted in human-readable order.

It overloads the < operator on the SolDevice class to implement sorting by process number and sorting by storage volume names (as they
should go, e.g.: sda, sda1, sda2...).

Reviewed by: cfeck, davidedmundson

Differential Revision: https://phabricator.kde.org/D7155

M  +1    -0    Modules/devinfo/devicelisting.cpp
M  +25   -0    Modules/devinfo/soldevice.cpp
M  +1    -0    Modules/devinfo/soldevice.h

https://commits.kde.org/kinfocenter/7c0f85162ee978753e7bbe726455b7388023afb6