* add In annotation
* remove struct forward declarations
* fix members initialization list in header
* merge removal code for function bodies and constructor definition
This temporary layer store (a QgsProject) is used as a
store for layers that are added if a parameter that
is evaluated to a layer requires that a new, non-active-project
layer is loaded. It means that these layers will remain accessible
for the duration of the algorithm's execution (or models
execution if an algorithm is run as part of a model), before
being automatically discarded when the QgsProcessingContext
used to run the algorithm/model goes out of scope.
This approach has several benefits:
- it means that algorithms (including c++ algorithms) are able
to use both project and non-project layers without needing
to handle any memory management themselves.
- it means that layers are guaranteed to last for the duration
of a model execution. This is currently an issue where models
which use memory layers as intermediate outputs do not
function correctly as the memory layers are destroyed before
the model has finished executing
- there should be no leakage of layers remaining open
after an algorithm exits
Remove processing vector.uniqueValues/vector.getUniqueValues
and port usage to c++ method
Should be much faster than the python method, as the c++ method takes
advantage of handing off the unique values calculation to the
provider source whenever possible
Move all scalebar rendering code out of composer and ensure that
all scalebar rendering is done independant of QgsComposerScaleBar
This allows scalebar rendering code to be reused by plugins
and by non-composer code.
Also rename QgsScaleBarStyle -> QgsScaleBarRenderer, (and all
subclasses too). This name better reflects what these classes do.
It's only flipping a bool, and possibly in some circumstances
it's more efficient to add features one by one rather than storing
large number of features in a temporary list
Also cleanup API for addFeature(s) in QgsVectorLayer, by removing
the unused extra argument from addFeature() and be removing the
makeSelected argument from addFeatures() (code should be adapted
to manually select added features after adding if desired - this
was only used in a single place in the QGIS code and I suspect
this was unintentional in any case)
This reverts commit 858129ddd3072d633e0abd97e1a45fe880f4cfb2.
I remember now... that was added to avoid a totally nonsense and
otherwise unfixable crash in the sip bindings...