This introduces QgsGeometry::makeValid() which will try to make a valid
geometry out of invalid one. This is more complicated method than just
doing a buffer with zero width, but it should not loose any vertices.
Finally we should have a reliable way in QGIS to fix bad geometries!
Ported the C code from lwgeom library to QGIS.
Another bit in the project refactoring work to get rid of dependencies
on QgsProject singleton.
Reading of layer trees from XML is now split into two phases:
1. read XML and keep layer IDs
2. resolve layer IDs to QgsMapLayer instances (using QgsProject)
There are convenience methods to do both phases in one go.
Avoids confusing overload behavior when constructing QgsRasterLayers
from c++ code. This extra constructor was causing character literals
to be converted to a boolean loadDefaultStyle flag instead
of being used as the provider key. Removing the extra constructor
avoids this, and removes some duplicate code.
... rather than using QgsProject::instance() internally
These are small cleanups to dig out some instance() uses and move them one level up...
At some point we should maybe make labeling engine configuration a part of QgsMapSettings
and have default project labeling engine config accessible from QgsProject
in a way similar to e.g. snapping configuration.
Instead make the layer tree canvas bridge advise on layer set
changes, and tie this into composer. So now composer acts
as a go-between to sync the composer map item's layer set to
the layer tree/canvas layers.
It's not an ideal solution, but avoids the hard link between
compositions and the map canvas.
Without this (should be unnecessary) virtual destructor the
shared data member for QgsProperty gets filled with garbage if
a QgsProperty is created from python code.
I can't explain it...!
Remove QgsAbstractProperty and subclasses, and instead use a single
QgsProperty class which covers the use of QgsAbstractProperty
and its subclasses. This simplifies the API and avoids pointer
handling. QgsProperty is implicitly shared for memory efficiency
and inexpensive copies.
Instead of defining the suitable field types and values for
properties when registering them to a data defined button,
now properties are fully defined when the valid
property keys are defined.