Instead of always defaulting to 100mb, then base the cache size
on the system memory:
- > 32gb, use 500mb
- 16-32gb, use 250mb
- else 100mb
The larger sizes can make a big difference to rendering speed for
complex projects, so let's let powerful systems utilise all that
memory!
(Only supported on linux for now)
to QgsApplication
In the long term all methods for retrieving available CRS details
should be moved here (instead of being scattered all over the place,
as they are now). But for now the logic for saving and updating
user CRS definitions has been moved here only.
The initial motivation is to create a central place where objects
can connect to in order to listen for when a user makes changes
to their custom projections.
Refs #40704
This registry provides a convenient place to add API relating
to generic connection fetching and handling methods
Currently contains a single method, which allows for retrieving
matching connections using a "provider://name" format (e.g.
"postgres://my connection")
QgsNumericFormat subclasses provide a means to format a numeric value
as a string, applying various formatting options. E.g. a default
string to value formatter (included here) includes settings for
controlling the number of decimal places, whether a thousands separator
should be shown, whether a leading + sign should be shown, whether
trailing zeros should be shown.
This PR also includes a formatter for bearings, allowing various
formats of numeric bearings to be applied (e.g. control over decimal
places, etc + control over whether direction E/W suffixes are shown,
or whether values should be limited to either the +/- 180 range or
0-360 degree range)
When formatting values, a QgsNumericFormatContext class is used
to provide context. Currently, this includes the thousands and
decimal separators to apply when formatting (which are taken by
default from the user's locale).
A registry of formatters is included to allow easy addition of
other formats in future (e.g. currencies, percentages, scientific
notation, etc...) and to allow plugin based formats.
The intention is to follow this up with gui configuration widgets
for the formats, and then expose them in various places through
the qgis ui (e.g. in the range editor widget for fields, in scalebar
numbers, as an option for formatting numeric labels, etc)
This is a follow-up of https://github.com/qgis/QGIS/pull/31772
Driver de-registration is now defered after application restart to avoid
any risk of potential crashes if a dataset using a disabled driver was
already in use.