89977 Commits

Author SHA1 Message Date
uclaros
e8c0d706f2 use null value when pasting as temporary layer and attributes cannot be converted 2025-02-07 10:23:48 +10:00
Jean Felder
a46f3e9752 postprocessing: Use QgsLayerTreeRegistryBridge to add layers
When a profile tool is already opened, the output of a procssing is
not added to its layer tree. This is because it relies on a
`QgsLayerTreeRegistryBridge`. Indeed, `QgsLayerTreeRegistryBridge`
listens to the `QgsProject::legendLayersAdded()` signal in order to
update the elevation profile tree view. However this signal is not
triggered by the current logic in `Postprocessing.py`because
`QgsProject::addMaplayer` is called with `addToLegend` set to
False. Then, the layer is added to the tree by calling
`QgsLayerTreeGroup::insertChildNode`.

This issue is fixed by creating a
`QgsLayerTreeRegistryBridge::InsertionPoint` to set the insertion
point and then calling `QgsProject::addMaplayer` with `addToLegend`
set to True.
2025-02-07 10:22:53 +10:00
Jean Felder
bd4eb2f2cf qgslayertreeregistrybridge: Add a layerInsertionPoint getter 2025-02-07 10:22:53 +10:00
Alexander Bruy
bf6268f2ff when adding WMS/WFS layers from Browser use project CRS if it is
supported by the server (fix #44325)
2025-02-07 10:05:29 +10:00
Jean Felder
98bfa4a589 qgsvectorlayer: Properly invalidate extent cache on feature deletion
This change is similar to the previous commit on feature addition.

When a feature is removed from a `QgsVectorLayer`
`QgsVectorLayer::deleteFeature` is called. This function makes mostly
2 things in case of a successful operation:
1. it calls `QgsVectorLayerEditBuffer::deleteFeature` which itself
   will emit the `QgsVectorLayerEditBuffer::featureDeleted`
   signal. Finally, `QgsVectorLayer` listend to this signal to
   directly emit the `QgsVectorLayer::featureDeleted` signal
2. Call `QgsVectorLayer::updateExtents()` to invalidate the cache of
   the extent

In practice, this means that the `QgsVectorLayer::featureDeleted`
signal may be emitted before the cache of the extent is
invalidated. This can cause some issues.

This issue is solved by calling `updateExtents()` before emitting the
`featureDeleted` signal.
2025-02-07 09:59:26 +10:00
Jean Felder
912bf7da3f qgsvectorlayer: Properly invalidate extent cache on feature addition
When a new feature is added to a `QgsVectorLayer`
`QgsVectorLayer::addFeature` is called. This function makes mostly 2
things in case of a successful operation:
1. it calls `QgsVectorLayerEditBuffer::addFeature` which itself will
   emit the `QgsVectorLayerEditBuffer::featureAdded` signal. Finally,
   `QgsVectorLayer` listend to this signal to directly emit the
   `QgsVectorLayer::featureAdded` signal
2. Call `QgsVectorLayer::updateExtents()` to invalidate the cache of
   the extent

In practice, this means that the `QgsVectorLayer::featureAdded` signal
may be emitted before the cache of the extent is invalidated. This can
cause some issues.

For example, in the elevation profile tool,
`QgsElevationProfileCanvas` listens to the
`QgsVectorLayer::featureAdded` signal in order to regenerate the
profile of a vector layer when a feature is added. This causes the
creation of a new `QgsVectorLayerProfileGenerator` which needs to copy
the extent of the vector layer. However,
`QgsVectorLayer::updateExtents()` has not been called yet. Thus, it
will use an outdated version of the extent.

This issue is solved by calling `updateExtents()` before emitting the
`featureAdded` signal.
2025-02-07 09:59:26 +10:00
Mathieu Pellerin
48b7079375 [symbology][gui] Fix symbol selector dialog not passing on its context to its widget 2025-02-07 08:47:23 +10:00
uclaros
c004c6662b Use reply content as an error string if it is plain text 2025-02-07 08:46:29 +10:00
Alessandro Pasotti
2f6bcb31a0
Merge pull request #60479 from elpaso/bugfix-gh60440-to_string-not-locale-aware
Mention in the docs that to_string is not locale-aware
2025-02-06 16:21:00 +01:00
Alexander Bruy
6b4ffb39a8
Merge pull request #60480 from alexbruy/processing-script-editor-typos
add missed import and fix getThemeIcon() call (follow-up #60261)
2025-02-06 12:10:34 +00:00
Julien Cabieces
278eb796fc
fix(Build): fix warning issues (#60428) 2025-02-06 11:34:43 +01:00
Alexander Bruy
b6d1d7e8d6 add missed import and fix getThemeIcon() call (follow-up #60261) 2025-02-06 09:54:48 +00:00
Alessandro Pasotti
685a002e6f Mention in the docs that to_string is not locale-aware
Fixes #60440
2025-02-06 10:24:50 +01:00
qgis-bot
d4526d748f auto sipify 🍺 2025-02-06 09:24:44 +00:00
Loïc Bartoletti
79e4ccbe16 fix(QgsMapToolCapture): Allow snapping point with different crs 2025-02-06 19:21:50 +10:00
Julien Cabieces
ab9582b247
Merge pull request #60470 from nyalldawson/deprecated_mask
Silence deprecation warnings for QgsMaskPaintEngine
2025-02-06 08:51:20 +01:00
Julien Cabieces
ae383d5653
Merge pull request #60472 from nyalldawson/exp_errors
More descriptive expression parsing errors when a function is not found
2025-02-06 08:49:25 +01:00
Nyall Dawson
e3db42f18d
Update test 2025-02-06 15:19:48 +10:00
qgis-bot
32881f55aa auto sipify 🍺 2025-02-05 23:18:35 +00:00
Nyall Dawson
6c3ad4ba26 Use translated wallet name 2025-02-06 09:15:43 +10:00
Nyall Dawson
dc20991c91 Add user facing warning if password cannot be verified 2025-02-06 09:15:43 +10:00
Nyall Dawson
893d135850 Add documentation 2025-02-06 09:15:43 +10:00
Nyall Dawson
8b9418833c Don't show message bar messages for successful wallet operations
These are noisy, only show warnings/errors instead
2025-02-06 09:15:43 +10:00
Nyall Dawson
8a0bb7f0fa On systems with keychain support, automatically just create a random
master authentication password and store in keychain

This avoids the need for users to manually create a pw, and makes
things MUCH nicer for plugins which want to utilise the secure
authentication framework.

Right now the options for plugins are:
1. Create a auto generated password themselves and force it on
the user (basically what we are doing here automatically now)
2. Show a confusing/scary message to users asking them to set
a master password. From my experience users have NO idea what
this means and consider it a QGIS bug.
2025-02-06 09:15:43 +10:00
Nyall Dawson
7dde9a9c02
More descriptive expression parsing errors when a function is not found
Include the name of the missing function in the error, so that it's
easier to debug.

Also fix a leak
2025-02-06 08:56:26 +10:00
qgis-bot
e32f996094 auto sipify 🍺 2025-02-05 22:40:01 +00:00
Alexander Bruy
b088ef2bc7 use dynamic_cast 2025-02-06 08:37:09 +10:00
Alexander Bruy
2fd017500b restore default scalebar style only if fill symbol is invisible 2025-02-06 08:37:09 +10:00
Alexander Bruy
1f7d1ad3d0 restore fill brush when switching back to single and double box scalebar
(fix #37413)
2025-02-06 08:37:09 +10:00
Nyall Dawson
e1ab89b16b
Silence deprecation warnings for QgsMaskPaintEngine
We can't silence the constructor deprecation warning
when used with make_unique, so just remove the constructor
deprecated flag.

This is a private class, not exposed to Python, and only
used from within QGIS by a class which is itself completely
deprecated (and marked accordingly).
2025-02-06 08:26:38 +10:00
qgis-bot
33aad3ef38 auto sipify 🍺 2025-02-05 18:41:06 +00:00
Nyall Dawson
5cb1720667 Fix clang tidy warnings 2025-02-06 04:38:13 +10:00
Nyall Dawson
c99605cef2 Add test 2025-02-06 04:38:13 +10:00
Nyall Dawson
0bd47dc504 Fix paint effects sometimes result in aliased rendering 2025-02-06 04:38:13 +10:00
Nyall Dawson
431bf62fae Cleanup memory management in paint effects
Don't use raw pointers, memory allocation
2025-02-06 04:38:13 +10:00
qgis-bot
aa8c16895d auto sipify 🍺 2025-02-05 15:16:47 +00:00
Alessandro Pasotti
e381be985b
Merge pull request #60441 from nyalldawson/auth_manager_ux_tweaks
Auth manager ux tweaks
2025-02-05 16:13:50 +01:00
Nyall Dawson
ff097244f9 Update src/core/processing/qgsprocessingutils.cpp 2025-02-05 20:54:06 +10:00
Alexander Bruy
e7d22c7e7c always return "main" label for main annotation layer 2025-02-05 20:54:06 +10:00
Alexander Bruy
ba555f1380 fix layer resolution logic 2025-02-05 20:54:06 +10:00
Alexander Bruy
08a410cbaf main annotation layer should be used as a valid option even if type hint
is set to UnknownType (fix #49010)
2025-02-05 20:54:06 +10:00
qgis-bot
6b3d6c843f auto sipify 🍺 2025-02-05 08:46:22 +00:00
Nyall Dawson
3f207fac49 Fix test
Test was buggy, the uri should not have contained a geometry type
2025-02-05 18:43:31 +10:00
Nyall Dawson
21224e9711 [sensorthings] Offer geometry for Datastream entities
(note that I cannot find any public servers which support this
without errors!)

Fixes #59525
2025-02-05 18:43:31 +10:00
Nyall Dawson
f705bad517 [sensorthings] Hide proxy fields for interval fields in filter builder
These don't exist on the backend, so just hide them from the builder
dialog to avoid user confusion.

(Note that it's impossible to show the actual non-proxy fields
here, as we can ONLY show fields with types compatible with native
QGIS field types in this dialog)

Fixes #59528
2025-02-05 18:43:13 +10:00
qgis-bot
e021958e99 auto sipify 🍺 2025-02-05 04:47:39 +00:00
Nyall Dawson
20972fceed More fixes for use of inline data for SVG content
Followup https://github.com/qgis/QGIS/pull/59589

Fixes #60427
2025-02-05 14:44:50 +10:00
Nyall Dawson
8749c3a471 Fix crash in text renderer when wrapping with one word + small rect
Refs #60256
2025-02-05 14:28:50 +10:00
Nyall Dawson
7ed63c0b0e When changing rect text annotation to fixed size mode, use current size
Instead of resetting the size to a default size, use the actual size
of the annotation item at the current map scale as the initial fixed
size.

Fixes #59189
2025-02-05 14:28:35 +10:00
qgis-bot
b676079373 auto sipify 🍺 2025-02-05 04:21:13 +00:00