When closing a 2D canvas dock, QGIS sometimes crashes. This is because
when the widget helper is closed, the canvas is closed. However, some
signals of the canvas widget may still be called after it is
called. Hence, the crash.
This issue is fixed by calling `deleteLater()` instead of `delete` to
ensure a proper deletion which properly takes into account the
signals.
Only create rules/categorized categories/graduated ranges if the
associated symbol could be converted to SLD, and is not an "empty"
symbol.
Otherwise we do not generate a rule, as SLD spec requires a
Symbolizer element to be present.
If snap on intersections is enabled, this specific edge search with the
locator was not in relaxed mode, whereas the standard snapping is
happening in relaxed mode.
As a result, trying to use the snapping during the first indexation was
freezing QGIS while the indexation is happening, waiting for it to end.
On a layer where the indexation is longer than the timeout (30sec, i.e.
a WFS layer as in issue #51179), the locator stops abruptly and resets
itself, crashing the indexation and QGIS.
The old method was very inefficient, as it required a re-load and
re-parse of the associated SVG file content with every clone, only
for many of the parsed properties to be immediately overwritten.
Optimise by just directly copying members, avoiding all unnecessary
work.
This is frequently seen as a hotspot when profiling map renders,
as that involves cloning all symbol layers upfront.
Speeds up a benchtest cloning 100k markers from 4.3 seconds to
150ms.
Setting an explicit size for a legend node should override all other settings,
including the heights calculated from minimum/maximum symbol size.
This is because explicit fixed sizes are PER NODE, and can be used as a last-resort
for users to manually adjust the sizing of one particular legend node
Rework internals of QgsTextRenderer horizontal text rendering,
so that:
1. It's easier to read, cleaning up years of accumulated cruft
2. Split out bits into smaller functions
3. Reduce the amount of duplicate code for text layout, so that
there's only one function responsible for horizontal text layout
instead of multiple
4. Add shortcut optimisations for rendering text + buffer/shadow
at the same time, instead of always drawing these completely
independantly of each other and incurring the cost of text path
calculation multiple times for the same bit of text. In a simple
benchtest this reduces the time required for rendering many
text fragments with buffers from 40 seconds to 27 seconds.
There's still more we could do here, but it's a start...
Now when a feature is externally modified on save (database trigger for
example), the dataChanged signal is emitted for indexes and caches
reconstruction.