Notes from "Async and representation"
David Edmundson
david at davidedmundson.co.uk
Sat Jan 18 22:37:12 UTC 2014
That QML demo seems to work awesomely \o/
I also fully support trying to get rid of AppletInterface.
----
Code comments on the cpp. (I know it's a work in progress, but I like
to stalk you)
You have compactRepresentation properties twice.
I assume the second one is meant to be the compactRepresentationExpander.
In compactRepresentationCheck when iconified you still call
QQuickItem *fullItem = qobject_cast<QQuickItem
*>(fullRepresentationItem());
which creates the fullRepresentation. I was under the impression we
wanted to avoid loading the full representation when we're not using
it. I don't fully understand what the compactRepresentationExpander is
for.
in compactRepresentation check we have:
full = m_preferredRepresentation.data() == m_fullRepresentation.data();
which means, if the preferredRepresentation is the fullRepresentation,
it will always be in full mode. If it is a more than just a preference
would:
full = m_compactRepresentation.isNull()
be better?
It will also be worth having a guard that that we're actually changing
representations. Some sort of if (item !=
m_currentRepresentationItem). Otherwise we're setting a lot of things
on every geometry change
More information about the Plasma-devel
mailing list