The original workaround was only supposed to apply to QList/
QVector of QVariantMaps. By replacing them all in sip we
break mapping of signals defined in c++ which are emitted
by Python code.
Fixes exceptions after running processing algorithms in Qt6
builds.
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.
sip6 converts all enums to python Enums, but ONLY creates
Enums with IntFlags types when the c++ type is an enum class : int.
Accordingly we need to patch back in all the operations which treat
enum values as ints, like |, &, bool, etc.
The long term solution here is to move all our c++ enums to enum
class, but that's not always straightforward and can break API
for plugins if it involves the signature of virtual methods.
This ensures that we correctly apply filters to recent projections
too, eg so that a widget showing only vertical crs will ONLY show
recent VERTICAL crs, not every recent crs.
Cleanup QgsProjectionSelectionWidget to use proper models to
drive the combo box. This removes a bunch of very fragile
logic regarding showing and hiding entries on demand, as it
allows us to move all the filtering logic to a single place
in a QSortFilterProxyModel subclass.
This has a few side benefits:
- The combos now dynamically respond to changes like recent
CRS being used in other places in QGIS
- The widget correctly respects horizontal/vertical crs filters
for all entries, including recent crs
Sets whether changes to the active layer should be temporarily
blocked. Exposes a previously private optimisation for use
by plugins.
This is a low-level method, designed to avoid unnecessary work when adding lots
of layers at once. Clients which will be adding many layers may call blockActiveLayerChanges( TRUE ) upfront,
add all the layers, and then follow up with a call to blockActiveLayerChanges( FALSE ). This will defer emitting
the active layer changed signal until they've added all layers, and only emit the signal once for
the final layer added.