23448 Commits

Author SHA1 Message Date
Nyall Dawson
f23caeef50 Leave null QByteArray values as QByteArray() to maintain API
These should probably be returned as None or NULL for consistency,
but let's not break API right now...
2024-06-13 05:59:14 +10:00
Nyall Dawson
fb30022bca Maintain API 2024-06-13 05:59:14 +10:00
Nyall Dawson
1a56be8cf8 Faster null conversions 2024-06-13 05:59:14 +10:00
Nyall Dawson
e85583fd7b Optimise QgsFeature __getitem__
Avoid calling expensive sipConvertFromNewType method when feature
attribute is a trivial type
Also avoid a copy of the feature attributes which we don't require
2024-06-13 05:59:14 +10:00
Nyall Dawson
f1c76432d5 Don't copy feature attributes just to get their length
Use attributeCount() directly instead
2024-06-13 05:59:14 +10:00
Nyall Dawson
d4ddd04efe Add missing HOLDGIL annotation for QgsGeometry::isEmpty 2024-06-12 13:50:13 +02:00
Nyall Dawson
e7bff1f50e Avoid API break 2024-06-11 07:45:09 +10:00
Nyall Dawson
0b41123cb9 Add SIP_OUT 2024-06-11 07:45:09 +10:00
uclaros
c6eb40f64f update docstrings 2024-06-11 07:45:09 +10:00
uclaros
6c0789da94 introduce error reporting parameter, limit classes to 999 2024-06-11 07:45:09 +10:00
Nyall Dawson
c7e3ff09a4 Partially address API limitations, and add a bunch of QGIS 4 TODOs
We can't fix the API without a significant break here.
2024-06-10 19:54:48 +10:00
Loïc Bartoletti
015e06575c [Processing] creategrid: Allow negative overlay
The creategrid algorithm had a limit of 0 to 1000000000.0.
I'm removing this limitation to go beyond this maximum limit, but above all to
allow a negative limit, which in fact allows an empty space
(the opposite of superposition).
2024-06-07 23:27:55 +02:00
Nyall Dawson
9eef4411f6 Small cleanup 2024-06-07 20:46:45 +10:00
Nyall Dawson
6a018f65f5 Move responsibility for opening files in external editor to QgsCodeEditorWidget
This allows the editor to be opened in a proper detached process,
avoiding the editor being closed when QGIS is exited.

Move to a blocklist for terminal text editors instead of the fragile
polling approach (which eg doesn't work if the editor is set to
pycharm)
2024-06-07 20:46:45 +10:00
Nyall Dawson
e42dc886aa Move file path handling for console editor to QgsCodeEditorWidget 2024-06-07 20:46:45 +10:00
Nyall Dawson
4a4c624e3e Fix python script editor "open in external editor" action
When a system has a EDITOR environment variable set to either
an invalid editor, or an editor which requires a terminal (eg
nano/vim), then fallback to the QDesktopServices approach
to opening the script

Avoids this button doing nothing.
2024-06-07 20:46:45 +10:00
Nyall Dawson
c685a9aa77 Replace processing default extension setting with string based setting
Change the setting key to force a reset for all users, and move to
a stable string based setting instead of a fragile int index key

Fixes #57676
2024-06-07 18:44:57 +10:00
Nyall Dawson
4986525e6b Ensure calling isSupportedOutputValue doesn't add layer to project
This is an advance test only, and shouldn't result in layers
attempting to add to the project.

Refs #57698
2024-06-07 18:44:29 +10:00
Nyall Dawson
1c60403286 Add testOnly option to parameterAsOutputLayer
If true, then the evaluated result won't be treated as an actual layer to load
2024-06-07 18:44:29 +10:00
Nyall Dawson
a845d4956c Fix add feature dialog does not restore position when shown modally
The logic to restore the position was incorrectly placed in ::show(),
which is not called when the dialog is being displayed modally via
::exec()
2024-06-07 08:11:01 +10:00
Nyall Dawson
756cb0552e [sensorthings] Use reasonable entity-specific defaults for expansions 2024-06-06 16:54:37 +10:00
Nyall Dawson
501a6a23f0 [sensorthings] Filter should be configurable on each expansion level
Filters must be configurable for each individual expansion level,
as we can't achieve the same results by a single top-level filter.
For instance, this prevents filtering children from the expansion
to return just the most recent observation.
2024-06-06 16:54:37 +10:00
Nyall Dawson
848af75957 Add QGIS 4.0 TODO 2024-06-06 13:57:48 +10:00
Nyall Dawson
9e0e257504 Deprecated unused method 2024-06-06 13:57:48 +10:00
Nyall Dawson
ffd504e0d4 BuildPyramids should be a provider capability, not an interface capabilitiy 2024-06-06 13:57:48 +10:00
Nyall Dawson
79150d1d5c Add some notes for 4.0 cleanups 2024-06-06 13:57:48 +10:00
Nyall Dawson
859a0ece06 Deprecate RasterInterfaceCapabilities which are unused 2024-06-06 13:57:48 +10:00
Nyall Dawson
3da2f533d5 Make raster data provider capabilities an enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
a7a19a7fc0 Don't use raw int for QgsRasterInterface capabilities 2024-06-06 13:57:48 +10:00
Nyall Dawson
2220473b4a Fix accidental paste 2024-06-06 13:57:48 +10:00
Nyall Dawson
3aae3a9ee4 Remove redundant duplicate enum 2024-06-06 13:57:48 +10:00
Nyall Dawson
43e7d18cd8 Move simplification enums to Qgis, promote to enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
3ace4676fa Improve results when using path stroking
Use GEOS to do the path stroking
2024-06-05 11:06:10 +10:00
Nyall Dawson
4eb35e466d Add hidden QSettings switch to use a QgsGeometry/GEOS backend for label masking
If the 'map/maskBackend' QSettings key is set to 'geometry', then
QgsGeometryPaintEngine will be used for calculating clip paths
for label masking instead of QPainterPath

The intention here is that we gain improved flexibility to optimise
the creation and logic behind clipping path generation, vs the
limited API we get from QPainterPath.
2024-06-05 11:06:10 +10:00
Nyall Dawson
9626644c7c Add option to remove redundant vertices in QgsAbstractGeometry::snappedToGrid
If opted in, then vertices which form a midpoint of a straight line segment will be removed in the output
2024-06-04 21:33:29 +10:00
Jacky Volpes
ab663b485b Use WkbType instead of GeometryType enum for addPart
Deprecating QgsGeometry::addPart in favor of QgsGeometry::addPartV2
to use Qgis::WkbType instead of Qgis::GeometryType because the latter
can't handle curved geometries (not specific enough).

Fixes #57255
2024-06-03 19:40:48 +02:00
Mathieu Pellerin
2c38dc8cbd
Merge pull request #57271 from nirvn/current_parent
[attribute form] Add parent feature scope when adding/editing a child feature through the relation editor widget
2024-06-03 13:39:10 +07:00
Nyall Dawson
b43537680c Add API to add list of geometries to collections
More efficient then adding one by one, and allows for efficient
transferral of geometries when pared with the new takeGeometries
method.
2024-06-03 14:38:57 +10:00
Nyall Dawson
27a2bcf064 Add API to take geometries from a collection
Removes the geometries from the collection and returns ownership
to the caller.

Can be used to avoid clones in some scenarios.
2024-06-03 14:38:57 +10:00
Mathieu Pellerin
96a711a2ae Address review: add vector layer tools context class, implement addFeatureV2 2024-06-03 11:05:58 +07:00
Mathieu Pellerin
83d61b5458 [atribute form] Add parent context when editing a child feature through the relation editor widget 2024-06-02 16:03:13 +07:00
Mathieu Pellerin
54e3668edd [attribute form] Add parent feature scope when adding a child feature through the relation editor widget 2024-06-02 16:03:13 +07:00
Mathieu Pellerin
f9d3ca3afe [qml] Add missing QgsProject's transactionMode property 2024-06-02 07:32:36 +07:00
Nyall Dawson
94b6003e3c Add list constructor for QgsMultiLineString too 2024-06-01 19:28:50 +10:00
Nyall Dawson
2871f5b8af Add constructor to directly create QgsMultiPolygon from list of polygons 2024-06-01 19:28:50 +10:00
Alessandro Pasotti
058601dcd5
Merge pull request #57630 from elpaso/qgsfeaturerequest-compare-method
[api] Add compare methods to QgsFeatureRequest
2024-06-01 11:04:36 +02:00
Alessandro Pasotti
30a1e36fe5
sipify 2024-06-01 08:09:57 +02:00
Alessandro Pasotti
f681cd459e [api] Add compare methods to QgsFeatureRequest
This will allow to reduce unnecessary expensive calls
when the request has not really changed.
2024-05-31 11:38:05 +02:00
Nyall Dawson
b89abdb64b Create optimised paint device to QgsGeometry converter 2024-05-31 15:02:35 +10:00
Nyall Dawson
0a493a0443 Move core painting related files to src/core/painting 2024-05-31 15:02:35 +10:00