Previously QgsSvgCache would often try to fetch remote images
using a network request on the main thread, by calling
processEvents repeatedly until the request was complete.
This caused lots of bugs, since the main thread processEvents
would proceed with all kinds of stuff assuming that the
svg fetch operation was complete, leading to frequent crashes
and deadlocks and making remote svg use impossible (it's
likely that the SVG cache remote fetching code was written
in the pre-multi-threaded rendering era).
There's no way to fix this with async svg fetching - we
HAVE to remove the processEvents call, and a QEventLoop
won't help either (since the method may be called on the
main thread). Accordingly the only solution is to
fetch the requested svg in the background, and return
a temporary "downloading" svg for use in the meantime.
We use a QgsNetworkContentFetcherTask to do this, so it's
nicely integrated with task manager.
A request task is fired up when a remote svg is requested
for the first time, with the temporary downloading svg
returned for use by the caller asynchronously. QgsSvgCache
then emits the remoteSvgFetched signal when a previously
requested remote SVG has been successfully fetched,
triggering a map canvas redraw with the correct SVG
graphic.
Fixes#18504
create expression context scopes
Allows algorithms which require the underlying layer scope
to operate correctly when running in selected features only
mode.
Fixes#17170
in a feature-based algorithm, don't try to continue processing
remaining features
Avoids multiple error dialogs appearing for every feature
in a layer...
Because Python code cannot catch and rethrow c++ exceptions
without losing context, we end up getting unknown exceptions
caught by c++ from python code (phew!).
So if we catch a python exception from processing, throw it
into the log so at least there's the full debugging detail
available on the console.
(Not ideal. Would love to see a PR allowing the full error
message to be passed correctly between c++/python/back again)
Allows algorithms to pre-processes a set of parameters, allowing the
algorithm to clean their values.
This method is automatically called after users enter parameters, e.g.
via the algorithm dialog. This method should NOT be called manually
by algorithms.
Also:
- move doxygen comments to header files so that they get included
in Python docstrings
- remove duplicate doxygen implemented in both header and footer
- remove some redundant doxygen for overridden methods
- add some missing docs
Provides a simple method for fetching remote HTTP
content in a QgsTask. Utilises QgsNetworkContentFetcher so
Url redirects and progress reports are automatically handled.
- we gain all of the styling capabilities of our text renderer engine (i.e. what powers
the rendering of labels)
- HTML support is gone for now, with virtually all of styling possibilities
covered by the above text renderer
Includes project metadata in PDF exports, and supported image
based formats.
Image based metadata support depends on the format and the
Qt library's handling of each particular format (e.g. PNG
outputs are well supported).
Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
Adds an option to include project metadata into SVG exports
generated from layouts, using the SVG RDF standard.
Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project