83 Commits

Author SHA1 Message Date
Julien Cabieces
6650438967 refactor(core): Use unique_ptr when class has clear ownership 2025-05-12 12:07:16 +02:00
Nyall Dawson
bdb5904283 Fix more malformed docstrings, enforce correct format in sipify 2025-04-09 14:04:24 +10:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
afd2e4f42d Fix doxygen class briefs which aren't full sentences 2025-04-01 09:44:00 +10:00
Nyall Dawson
ac71664a83 Fix multiparagraphs in initial class docstrings 2025-03-30 20:48:07 +10:00
Nyall Dawson
602ef6c691 Don't start class briefs with "This class contains settings..."
It's unncessarily verbose, use just "Contains settings..." instead.
2025-03-30 20:48:07 +10:00
Nyall Dawson
b81e0d83f6 Fix non-compliant class brief documentation 2025-03-30 20:48:07 +10:00
Nyall Dawson
a315e07657 Expand docs 2025-03-24 10:25:39 +10:00
Nyall Dawson
6953aec591 Just require ints instead of QNetworkAccessManager::Operation enum
The sip conversion code fails with enums under qt 6
2025-03-24 10:25:39 +10:00
Nyall Dawson
b9b519950d [api] Add advanced network request preprocessor capabilities
Allows mutating the request, network operation and request data.

Intended for mocking eg post requests in unit tests
2025-03-24 10:25:39 +10:00
Nyall Dawson
148ae1fb28 Add equality operator for QgsHttpHeaders 2025-02-12 06:33:14 +10:00
Even Rouault
d5edd0811f webconnections saving as .xml: add a xmlns:x=y attribute when the http-header: prefix is used
Fixes #60242
2025-01-30 08:47:01 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
38af55cb85 Add missing docs 2024-09-08 16:06:22 +10:00
Nyall Dawson
cfd251e7f7 Capture signal arguments 2024-09-08 16:06:22 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
519959154a Fix some overly verbose class "brief" descriptions 2024-08-28 11:58:21 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Even Rouault
d2272306f5 QgsBlockingNetworkRequest::get(): add an optional flag parameter 2024-07-29 12:14:29 +10:00
Nyall Dawson
c2c75f3b19
More no-value dox removal 2024-07-25 09:04:22 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Matthias Kuhn
912ae75fb0
Merge branch 'master' into no-leak-build-path 2024-03-04 09:10:53 +01:00
Mathieu Pellerin
f2d70de878 Address review 2024-02-26 11:43:23 +07:00
Mathieu Pellerin
e79bd538b6 [network logger] Insure the actual request URL is properly reflected in the logger 2024-02-26 11:05:12 +07:00
Matthias Kuhn
60940bfe16 Do not leak build env paths into public headers 2024-02-24 21:48:32 +01:00
Even Rouault
d6d4802685
Remove obsolete since 1.x 2024-02-19 11:35:09 +01:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00
Nyall Dawson
503a95a1a1 Move enums to Qgis namespace for consistency 2024-02-02 04:59:04 +10:00
Alessandro Pasotti
30d69e1a7c doxy 2023-12-14 13:01:00 +01:00
Alessandro Pasotti
6026a03db6 News feed: allow updates and expiry changes 2023-12-14 13:01:00 +01:00
Alessandro Pasotti
5e472182f0 Feed: allow editing and check end publishing 2023-12-14 13:00:59 +01:00
Denis Rouzaud
da76caa880 finalize news feed parser settings migration 2023-02-06 12:54:08 +10:00
Denis Rouzaud
53f37456de fix some dox + remove extra includes 2023-01-16 09:00:50 +01:00
Denis Rouzaud
44039d164c sipify them all 2023-01-16 09:00:49 +01:00
bdm-oslandia
e631771db7 fix(core): extract httpheaders when creating QgsDataSourceUri from string 2023-01-12 05:41:37 +10:00
Nyall Dawson
75355386c2 Add helper methods to get filename from content disposition headers 2022-06-20 13:01:55 +10:00
Nyall Dawson
0f4f5cd2cc Description for QgsNetworkContentFetcherTask can be customised 2022-06-20 13:01:55 +10:00
bdm-oslandia
9b0bb2ffb5 add tests and fix spellcheck (compatiblity by compatibility) 2022-06-09 10:05:15 +10:00
bdm-oslandia
60db820f19 Replace all use of 'referer' http header as single var by QgsHttpHeader class
* add wrappers in QgsHttpHeader to read from/write to QMap, QUrlQuery, DomElement
* add QgsHttpHeader in QgsDataSoureUri, QgsXyzConnection, QgsVectorTileProviderConnection::Data, QgsWmsAuthorization
* fix tests
2022-06-09 10:05:15 +10:00
bdm-oslandia
cb436fe3d6 Fixes for bad key names
* fix QgsHttpHeaders:
  * when key contains double //
  * clean old sub group before adding new key to avoid duplicate

* fix QgsHttpHeaderWidget:
  * QTableWidgetItem flags for value was not set
  * call to QTableWidget edit function fail
  * table was not cleaned properly when adding entries

* fix QgsHttpHeaders test
2022-06-09 10:05:15 +10:00
bdm-oslandia
ed0236782d Fix issue #48532
* add constructor without QgsSettings, using default
* add new const QgsHttpHeaders::KEY_REFERER
* add test for QgsOwsConnection
* QgsOwsConnection:
  * fix usage of "referer" by using QgsHttpHeaders
  * replace "qgis/" prefix by QgsSettings::Prefix::QGIS
2022-06-09 10:05:15 +10:00
uclaros
bb767336e7 fix docstrings 2022-06-08 09:41:57 +10:00
Nyall Dawson
eeb444948f Add mechanism for python clients to setup custom QNetworkReply
preprocessors

Since it's not possible to overwrite
QgsNetworkAccessManager::createRequest, the normal Qt approach for
adding custom handling for replies is not possible. This new API
adds a QgsNetworkAccessManager.setReplyPreprocessor() method
which allows clients to add a custom reply preprocessor for implementing
their own logic for replies.

For example:

    def _on_ready_read(reply):
        print(reply.peek(reply.bytesAvailable()))

    def _my_preprocessor(request, reply):
        if reply.operation() == QNetworkAccessManager.PutOperation:
            reply.readyRead.connect(partial(_on_ready_read, reply))

    QgsNetworkAccessManager.setReplyPreprocessor(_my_preprocessor)

Fixes #48169
2022-05-02 12:31:42 +10:00
bdm-oslandia
61519ec834 remove dead code, fix comment, fixes from review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-12-02 11:16:53 +10:00
bdm-oslandia
c1582ce1c3 fix: indent, doc, typo 2021-12-02 11:16:53 +10:00
bdm-oslandia
345dd4dd87 fix: replace referer http header by dedicated class QgsHttpHeader 2021-12-02 11:16:53 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00