Skip to content

Commit

Permalink
Remove flags from custom widgets constructor, support QJazz
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jan 7, 2025
1 parent 97a7422 commit e152d8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions lizmap/server_lwc.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,14 +682,16 @@ def request_finished(self, row: int):
# plugins = {'atlasprint': {'version': '3.2.2'}}
# Temporary, add plugins as markdown in the data
markdown += f'* QGIS Server : {qgis_server_version}\n'
py_qgis = qgis_server_info.get('py_qgis_server')
if py_qgis:
py_qgis_version = py_qgis.get('version', 'Not used')
server_wrapper = qgis_server_info.get('py_qgis_server')
if server_wrapper:
wrapper_version = server_wrapper.get('version', 'Not used')
wrapper_name = server_wrapper.get('name', 'Py-QGIS-Server or QJazz')
else:
# Legacy, old server running
py_qgis_version = qgis_metadata.get('py_qgis_server_version', 'Not used')
wrapper_version = qgis_metadata.get('py_qgis_server_version', 'Not used')
wrapper_name = 'Py-QGIS-Server'

markdown += f'* Py-QGIS-Server : {py_qgis_version}\n'
markdown += f'* {wrapper_name} : {wrapper_version}\n'
for plugin, info in plugins.items():
plugin_version = info['version']
if plugin_version.lower().startswith("not"):
Expand Down
4 changes: 2 additions & 2 deletions lizmap/widgets/warning_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class WarningWidget(QWidget):

""" Widget to show a warning sign with a text. """

def __init__(self, flags, *args, **kwargs):
def __init__(self, *args, **kwargs):
""" Constructor. """
super().__init__(flags, *args, **kwargs)
super().__init__(*args, **kwargs)

layout = QHBoxLayout(self)
image_widget = QLabel()
Expand Down

0 comments on commit e152d8f

Please sign in to comment.