setElementPrefix does not trigger repaintNeeded() from the svg object;
repaintNeeded() is for internal changes. if you change the svg from your
own application code, the app code needs to react to those changes in its
own time and way.
so margins was never seeing that it was getting changed when setElementPrefix
was called -> pixel imperfections in layouts.
even just setting the sort/filter roles is not enough. role names must also be set again!
gaaaah. thankfully this seems to be very fast, though would still be nice to avoid it if
possible somehow.
CCBUG:308101
syncRoleNames is fast (and faster now that we check that the role names actually changed)
but it may be nicer to find a more efficient way in future than checking the role names
on all / any data changes. in fact, the documentation for QAbstractItemModel::setRoleNames says:
"This function must be called before the model is used.
Modifying the role names after the model has been set may result in undefined behaviour."
BUG:308101
The noop check m_sortRole == role has to be removed
because the hash table m_roleIds can change between two calls to
setSortRole (as it actually happens when resync the hash table).
Possibly one could perform a more clever check (i.e. adding some
m_invalidated flag which would override the check), but I am not sure it is
really worth it.
This fixes sorting issues in the Plasma Device Notifier
CCMAIL:notmart@gmail.com
Introduces QAbstractItemModel to QDeclarative when setting up
the plasma core components.
This way we don't have to cast to the type ourselves and produce proper
QML errors if the type is not correct. This happened with Plasma::SortProxyModel.
REVIEW: 106267
filter the sources of the dataengine
The sources were not getting filtered due to an
error in the loop that added all the sources
in any case
REVIEW: 105267
It seems QML sets properties to their default value at startup and thus
calls setSortRole(QString()), which causes SortFilterModel to sort by
default.
CCMAIL: mart@kde.org