Sometimes src_to_tokens returns multiple tokens at the same offset.
This is likely a bug in some versions of tokenize_rt, but this
workaround avoids an exception occurring in the QGIS script.
This allows us to control the sort order and limit for each expansion,
and gives us more flexibility in future to eg handle per expansion
filter strings
This action will run only the selected steps in a model, allowing
the user to run a subset of the model.
The initial state will be taken from any previous executions of the
model through the designer, so results from previous steps in the
model are available for the selected steps.
This makes it possible for a user to fix parts of a large model,
without having to constantly run the entire model to test. Especially
useful when earlier steps in the model are time consuming!
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.
These don't work well with Qt6 -- by blocking any new ones we
avoid having to monkey patch in compatibility code in order to avoid
breaking existing API when we later have to upgrade them to enum
classes
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.
The object.addAction variants with multiple arguments have changed
signature in Qt 6. It's safer to explicitly create a QAction first
and then add to an object using:
my_action=QAction(...)
obj.addAction(my_action)
It's a considerably less fragile syntax to use in any case!
Fixes errors when trying to show context menu in Python console
on Qt 6 builds
Auto replace qApp with QApplication.instance()
Raise warnings if script imports QRegExp. We can't auto replace
with QRegularExpression here, the API is just way too different.
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.