So I don't have any outstanding reviews I'm going to close this on the grounds that this is a Qt library and not a QML one.
You need to write helper code to call qmlRegisterType anyway so any other QML or greeter specific code should be done in your code and not in here which is shared in many projects.
(BTW, If you do go with this approach, call itemData() once on the model then loop through that rather than calling data() for each role which is a much slower operation performing a list lookup each time)
So I don't have any outstanding reviews I'm going to close this on the grounds that this is a Qt library and not a QML one.
You need to write helper code to call qmlRegisterType anyway so any other QML or greeter specific code should be done in your code and not in here which is shared in many projects.
For this particular case it's probably worth having a helper method in Ubuntu globally, rather than trying to update every existing model. KDE, for example, uses this: http:// api.kde. org/4.x- api/kde- runtime- apidocs/ plasma/ declarativeimpo rts/core/ html/classPlasm a_1_1SortFilter Model.html
(BTW, If you do go with this approach, call itemData() once on the model then loop through that rather than calling data() for each role which is a much slower operation performing a list lookup each time)