88904 Commits

Author SHA1 Message Date
Nyall Dawson
18764a3452 Use proper toolbar in documentation browser for consistency
And show frame for web view
2024-11-29 10:54:09 +10:00
Nyall Dawson
454f5ecab4 Hide 'OpenGL Core Profile was requested' warnings
These are coming from WebEngine, we can't do anything about them
2024-11-29 10:54:09 +10:00
Nyall Dawson
c776ddb024 Remove margins from API documentation panel
Adds consistency with other dev tools panels
2024-11-29 10:54:09 +10:00
Yoann Quenach de Quivillic
808a78907f Add unit test 2024-11-29 10:42:52 +10:00
Yoann Quenach de Quivillic
fc7afe83c1 Fix layout picture rotation 2024-11-29 10:42:52 +10:00
Matthias Kuhn
9251f486a0 Avoid freeze when opening feature form with many relation widgets 2024-11-29 09:32:18 +10:00
Even Rouault
9b3ea776a2 QgsOpenClUtils::activate(): try to catch low-level Windows SEH to avoid hard crashes when OpenCL initialization fails
Tries to workaround #59617
Totally untested on my side. Might not be a good idea
2024-11-29 08:46:18 +10:00
Mathieu Pellerin
81f0fc300b Fix clang-tidy warning 2024-11-29 08:39:03 +10:00
Mathieu Pellerin
1c3db77134 [ui] Improve rendering of color button widget for semi-opaque colors 2024-11-29 08:39:03 +10:00
Jacky Volpes
d11a318081 fix(elevationprofilecanvas): avoid crash on segfault
If no profile curve is set and regenerateResultsForLayer is run
(triggered by adding a feature in a layer for instance), then QGIS
crashes.
2024-11-29 08:38:43 +10:00
qgis-bot
192e107577 auto sipify 🍺 2024-11-28 14:24:33 +00:00
Jacky Volpes
bd49d6cf41 fix(featurepool): cache management - fixes #58113
Geometry checker cache does not work properly with memory layers.
refreshCache now handles a list of updated features to be thread-safe.

Also, fixes a locker mode, and correctly remove features from spatial
index.
2024-11-28 15:21:21 +01:00
qgis-bot
da86bc17a6 auto sipify 🍺 2024-11-28 04:40:16 +00:00
Jean Felder
9d372b6019 qgsrasterlayer: Remove refresh logic
This is not used anymore.
2024-11-28 14:37:06 +10:00
Jean Felder
e123726882 qgsrasterlayerrenderer: Change the logic to refresh the renderers
This replaces the existing logic in `QgsRasterLayerRenderer` which
calls `QgsRasterLayer::refreshRendererIfNeeded()` to refresh the
renderer associated `QgsRasterLayerRenderer` and the raster associated
with `QgsRasterLayer`. It also makes GUI updates.

With this approach, the following new logic is done:
 1. `QgsRasterRenderer::needsRefresh()` is called to check if
 `rasterRenderer` needs to be updated.
 2. If a refresh is needed, the new min/max values are computed by
 calling `QgsRasterLayer::computeMinMax()`
 3. The min/max values are used to refresh `rasterRenderer`
 4. The min/max values are stored in a `QgsRenderedLayerStatistics`
 and propagated to `QgisApp`
 5. In QgisApp, `QgsRenderedLayerStatistics` is used to refresh the
 renderer of `QgsRasterLayer` and force a refresh of the style and the
 legend if the change comes from the main canvas.
2024-11-28 14:37:06 +10:00
Jean Felder
76cbf8b3a5 qgsrasterlayer: Make computeMinMax public
This will be used in the next commit to refresh a renderer.
2024-11-28 14:37:06 +10:00
Jean Felder
dd36eb7249 qgsrasterrenderer: Introduce refresh
This is similar to what is achieved in
`QgsRasterLayer::refreshRenderer()` to refresh the renderer according
to an extent. Contrary to the first one, this method does not perform
any GUI update or emit any signal.

It is not used at the moment. This will replace the logic to refresh a
renderer in the following commits.
2024-11-28 14:37:06 +10:00
Jean Felder
2747710499 qgsrasterrenderer: Introduce needsRefresh
This is similar to what is achieved in
`QgsRasterLayer::refreshRendererIfNeeded()` to check if the renderer
needs to be refresh according to an extent. It does not perform any
refresh.

It is not used at the moment. This will replace the logic to refresh a
renderer in the following commits.
2024-11-28 14:37:06 +10:00
Jean Felder
efaff7e2f5 introduce qgsrenderedlayerstatistics
This will be used in the next commits to store the min-max values of a
raster layer and report them to the main canvas.
2024-11-28 14:37:06 +10:00
Nyall Dawson
c65d9e2dea Apply suggestions from code review
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
2024-11-28 11:54:54 +10:00
Nyall Dawson
49bf5aecd4 Fix test on newer proj
Change wkt to a crs which won't be identified as EPSG:4326 on newer proj versions
2024-11-28 11:54:54 +10:00
Nyall Dawson
832d8d05a1 Adapt test for GDAL 3.9 results 2024-11-28 11:54:54 +10:00
Even Rouault
92c7197bee QT6 testing: unbreak PyQgsPythonProvider, PyQgsMemoryProvider, PyQgsShapefileProvider, PyQgsSpatialiteProvider 2024-11-28 11:45:03 +10:00
Juergen E. Fischer
6302af30a3 save QGIS_AUTH_PASSWORD_FILE before FCGI_Accept() destroys it 2024-11-27 09:08:36 +01:00
Julien Cabieces
ff6e7551f2
Merge pull request #59589 from nyalldawson/fix_59575
Fix use of inline data for SVG content
2024-11-27 08:39:18 +01:00
Nyall Dawson
da1d5161d0 Ensure QgsO2 is compatible with expiry dates > January 19th 2038 2024-11-27 11:47:02 +10:00
Nyall Dawson
4ef0d081ae Resync o2 library 2024-11-27 11:47:02 +10:00
Nyall Dawson
cef9898afe Avoid clang-tidy false positive memory leak warning 2024-11-27 11:47:02 +10:00
Nyall Dawson
80878a8ddd Fix false positive clang tidy warning 2024-11-27 11:47:02 +10:00
Nyall Dawson
1829124eb4 Fix warning 2024-11-27 11:47:02 +10:00
Nyall Dawson
7a65b10597 Fix instance 2024-11-27 11:47:02 +10:00
Nyall Dawson
bb1c12eab0 Ensure that O2 linkage is done in a thread-safe way
We need to ensure that the link method is ONLY ever called from
the QgsO2 object's thread, because it involves creation of
child items and that is explicitly prohibited from external
threads by Qt.
2024-11-27 11:47:02 +10:00
Nyall Dawson
73d6984b4b Fix deadlock in oath2 authentication
We have to take care that we don't directly create QgsO2 objects
on the thread where the authentication request is occurring,
as QgsO2 objects are long running but the thread requesting
authentication may be short-lived. If we create QgsO2 objects
on a short-running thread, then when we later try to
authenticate using the same oauth2 authentication method we
will get a deadlock, as the O2 reply server will no longer
have an active thread or an event loop running.

This was especially evident in browser items which use oauth2
authentication. Since these are usually populated using very
short-life threads, we'd often hit this situation:

1. The connection would be expanded. Browser would create a thread
to populate the connection. The oauth2 objects would then be created
on this same thread, and everything would initially work OK. The
user could complete the authentication since the browser population
thread was blocked until this was done.
2. The browser item got populated, and then the thread populating
it was destroyed
3. Later, something else would request authentication using the
same oauth2 config. This may be eg the user expanding out a
different folder on the browser connection.
4. If the oauth2 token had expired, then we'd try to refresh it.
But this relied on event-based logic, and the event loop for the
QgsO2 object was no longer around to handle this. The authentication
request would dead-lock.

Fix this by ensuring that all QgsO2 objects are created and run on
an instance of a new QgsOAuth2Factory QThread. This thread is created
on demand, and will then exist for the life of the QGIS session.

This ensures that all QgsO2 objects will run on a thread with an
application-long lifetime, so there's no issue if they later
require event-loop based logic (such as token refresh)
2024-11-27 11:47:02 +10:00
Nyall Dawson
84a1775a80 Avoid leak of QgsAuthOAuth2Config
And make ownership clear by setting parent to the QgsO2 parent
2024-11-27 11:47:02 +10:00
Nyall Dawson
ed4b2833f3 Simplify QgsAuthOAuth2Method::getOAuth2Bundle
We do not need to use deleteLater here for QgsAuthOAuth2Config,
so we can considerably simplify the logic
2024-11-27 11:47:02 +10:00
Nyall Dawson
82d29dbc7a Remove unused member 2024-11-27 11:47:02 +10:00
Nyall Dawson
f4215ae55c Protect config cache in QgsAuthOAuth2Method with read/write lock
This is being accessed across multiple threads, so we need
to protect access accordingly
2024-11-27 11:47:02 +10:00
Nyall Dawson
d740a31d35 OAuth2 config cache should not be static
We only ever create one instance of a QgsAuthMethod, so there's no need
for this member to be static
2024-11-27 11:47:02 +10:00
Nyall Dawson
01b6c2f59a Fix some warnings 2024-11-27 11:47:02 +10:00
Nyall Dawson
e55b879d5c Avoid false-positive clang-tidy warning 2024-11-27 11:47:02 +10:00
Nyall Dawson
c8ba38c794 Use QgsDebugMsgLevel/QgsDebugError 2024-11-27 11:47:02 +10:00
Nyall Dawson
0dbf6e730b Add equality operator for QgsMesh3DSymbol 2024-11-27 10:53:53 +10:00
Jacky Volpes
acc0089091 fix(layertreeview): add checks on nullptr to avoid segfaults
check calls to layerTreeModel(), selectedModel(), and use of mProxyModel
2024-11-27 07:19:41 +10:00
Harrissou Sant-anna
5fc3c0991d Add "GCP" to the Georeferencer buttons label, for harmonization 2024-11-27 07:18:09 +10:00
qgis-bot
cfeafb4610 auto sipify 🍺 2024-11-26 21:13:42 +00:00
Yoann Quenach de Quivillic
8a61c97df3 Apply suggestions from code review 2024-11-27 07:10:29 +10:00
Yoann Quenach de Quivillic
32c6a3d8e7 Add global enum 2024-11-27 07:10:29 +10:00
Yoann Quenach de Quivillic
5d8d099a8d Edit manual table on double click 2024-11-27 07:10:29 +10:00
Yoann Quenach de Quivillic
697f877791 Add static method to edit manual table 2024-11-27 07:10:29 +10:00
Yoann Quenach de Quivillic
b4db34e853 Call double click handler 2024-11-27 07:10:29 +10:00