QString methods
Using single quotes is a significant performance boost. Rough
benchmarks indicate the QString single quote methods take
about 15% of the time the double quote variants take.
- use at() instead of [] for temporary containers (at() returns
const reference, so it avoids the detach which occurs with [])
- use at( 0 ) rather than first() for containers, because first()
detaches (Qt5 introduced constFirst()/constLast() to overcome this)
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
... by explicitly passing QString arguments. Otherwise the string
literals are implictly converted to bool and the wrong constructor
is called.
This is not an ideal solution as the API is still misleading, but I
can't see an alternative solution without breaking API and making
one of the constructors explicit or changing their signature.
This allows for reordering, renaming and removal of legend nodes.
Composer either uses default project layer tree (auto-update on)
or customized layer tree (auto-update off).