Skip to content

Commit

Permalink
Enable Qt6 for the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Oct 30, 2024
1 parent 0cd30fc commit 0565581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions atlasprint/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ category=Plugins
icon=icon.png
experimental=False
deprecated=False
supportsQt6=True
4 changes: 2 additions & 2 deletions atlasprint/plausible.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _send_stat_event() -> bool:
if extra_debug:
request.setRawHeader(b"X-Debug-Request", b"true")
request.setRawHeader(b"X-Forwarded-For", b"127.0.0.1")
request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json")
request.setHeader(QNetworkRequest.KnownHeaders.ContentTypeHeader, "application/json")

# Qgis.QGIS_VERSION → 3.34.6-Prizren
# noinspection PyUnresolvedReferences
Expand Down Expand Up @@ -125,7 +125,7 @@ def _send_stat_event() -> bool:
logger = Logger()
message = (
f"Request HTTP OS process '{os.getpid()}' sent to '{plausible_url}' with domain '{plausible_domain} : ")
if r.error() == QNetworkReply.NoError:
if r.error() == QNetworkReply.NetworkError.NoError:
logger.info(message + "OK")
else:
logger.warning(message + r.error())
Expand Down

0 comments on commit 0565581

Please sign in to comment.