jrgdre / dbus-inspector

Sailfish OS GUI Application for the convenient introspection of D-System- and D-Session-Bus services, interfaces, signals, methods and properties.
MIT License
6 stars 2 forks source link

Sorting services by their name by default #2

Closed martonmiklos closed 6 years ago

martonmiklos commented 6 years ago

Hi Joerg,

I know I owe you with implementing #1 , but I came across some DBUS related hacking again, and found the unordered service list a bit inconvenient. By sorting the services by name it became easier to find a service. This PR implements the sorting.

jrgdre commented 6 years ago

@martonmiklos Hi, I have successfully merged your pull request and run it in the emulator. Everything looks good so far. Ran into a coule of issues updating my Jolla, but that seems to be fixed now and I hope I can test the new version on the device tomorrow. After that I will push the canges and submitt the new version to Harbour. As you are probably aware, this will only sort the service lists, it will not sort the functions, etc. For that I'm still looking for a solution on how to sort the XmlListModel.

martonmiklos commented 6 years ago

Hey, Sorting the functions was not so painful in my case since I have not dealt with services having a lot functions.

My first guess was the QSortFilterProxyModel, but it seems that it is not wrapped to QML officially. But there is a 3rd party lib for this: https://github.com/oKcerG/SortFilterProxyModel

My another guess would be the sorting via XPATH, but I doubt that the XmlListModel supports it: https://www.w3.org/TR/xpath-functions-31/#func-sort