Skip to content

fix logging to use enum instead of int#44

Open
Nimrod51 wants to merge 1 commit into
enricofer:masterfrom
Nimrod51:logging-fix
Open

fix logging to use enum instead of int#44
Nimrod51 wants to merge 1 commit into
enricofer:masterfrom
Nimrod51:logging-fix

Conversation

@Nimrod51

@Nimrod51 Nimrod51 commented Nov 3, 2025

Copy link
Copy Markdown

No description provided.

@kannes

kannes commented Dec 4, 2025

Copy link
Copy Markdown

This PR is a fix for QGIS4/Qt6 compatibility. Otherwise the logging would crash:

iface.messageBar().pushMessage(title="foo", text="bar", level=1)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: QgsMessageBar.pushMessage(): arguments did not match any overloaded call:
  overload 1: argument 'level' has unexpected type 'int'
  overload 2: argument 'level' has unexpected type 'int'
  overload 3: 'level' is not a valid keyword argument

while iface.messageBar().pushMessage(title="foo", text="bar", level=Qgis.MessageLevel.Warning) works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants