Skip to content

Commit

Permalink
Raise QGIS minimum version to 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Dec 6, 2023
1 parent 1d6020c commit 691f95b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
strategy:
matrix:
qgis_version: [
"release-3_34",
"release-3_28",
"release-3_22",
"release-3_16",
"release-3_10",
# "latest",
]
steps:
Expand Down
13 changes: 1 addition & 12 deletions lizmap/dialogs/dock_html_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
import logging

from qgis.core import (
Qgis,
QgsApplication,
QgsExpression,
QgsExpressionContext,
QgsExpressionContextUtils,
QgsMapLayerProxyModel,
QgsProject,
)

if Qgis.QGIS_VERSION_INT >= 31400:
from qgis.gui import QgsFeaturePickerWidget

from qgis.gui import QgsMapLayerComboBox
from qgis.gui import QgsFeaturePickerWidget, QgsMapLayerComboBox
from qgis.PyQt.QtCore import QDateTime, QLocale, QUrl
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import (
Expand Down Expand Up @@ -56,12 +51,6 @@ def __init__(self, parent, *__args):
self.dock = QWidget(parent)
self.layout = QVBoxLayout(self.dock)

if Qgis.QGIS_VERSION_INT < 31400:
self.label = QLabel('You must install at least QGIS 3.14')
self.label.setWordWrap(True)
self.layout.addWidget(self.label)
return

if not WEBKIT_AVAILABLE:
self.label = QLabel(tr('You must install Qt Webkit to enable this feature.'))
else:
Expand Down
7 changes: 2 additions & 5 deletions lizmap/dialogs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
QgsProject,
QgsSettings,
)
from qgis.gui import QgsFeaturePickerWidget
from qgis.PyQt.QtCore import QSize, Qt
from qgis.PyQt.QtGui import (
QDesktopServices,
Expand Down Expand Up @@ -100,11 +101,7 @@ def __init__(self, parent=None, is_dev_version=True):
self.dataviz_viewer = QLabel(tr('You must install Qt Webkit to enable this feature.'))
self.html_content.layout().addWidget(self.dataviz_viewer)

if qgis_version() >= 31400:
from qgis.gui import QgsFeaturePickerWidget
self.dataviz_feature_picker = QgsFeaturePickerWidget()
else:
self.dataviz_feature_picker = QLabel(tr("You must install QGIS 3.16 to enable the dataviz preview."))
self.dataviz_feature_picker = QgsFeaturePickerWidget()

self.feature_picker_layout.addWidget(self.dataviz_feature_picker)
self.feature_picker_layout.addItem(QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding))
Expand Down
2 changes: 1 addition & 1 deletion lizmap/metadata.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[general]
name=Lizmap
qgisMinimumVersion=3.10
qgisMinimumVersion=3.16
qgisMaximumVersion=3.99
author=3Liz
[email protected]
Expand Down
7 changes: 2 additions & 5 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
# In a standalone application
QGIS_PLUGIN_MANAGER = False

from qgis.core import QgsProjectServerValidator

from lizmap.qgis_plugin_tools.tools.custom_logging import (
add_logging_handler_once,
setup_logger,
Expand Down Expand Up @@ -176,8 +178,6 @@
from lizmap.tooltip import Tooltip
from lizmap.version_checker import VersionChecker

if qgis_version() >= 31400:
from qgis.core import QgsProjectServerValidator
if qgis_version() >= 32200:
from lizmap.server_dav import WebDav

Expand Down Expand Up @@ -3530,9 +3530,6 @@ def clean_project(self):

def check_project_validity(self):
"""Project checker about issues that the user might hae when running in LWC."""
if qgis_version() < 31400:
return None, None

# Import must be done after QTranslator
from lizmap.widgets.check_project import Checks, Error

Expand Down
2 changes: 1 addition & 1 deletion lizmap/server_lwc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def migrate_password_manager(self, servers: list):
config.setConfig('password', password)
config.setConfig('realm', QUrl(url).host())

if qgis_version() < 320000:
if qgis_version() < 32000:
auth_manager.removeAuthenticationConfig(auth_id)
result = auth_manager.storeAuthenticationConfig(config)
else:
Expand Down
7 changes: 3 additions & 4 deletions lizmap/table_manager/dataviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
resources_path,
)
from lizmap.table_manager.base import TableManager
from lizmap.tools import merge_strings, qgis_version, to_bool
from lizmap.tools import merge_strings, to_bool

LOGGER = logging.getLogger(plugin_name())

Expand Down Expand Up @@ -67,9 +67,8 @@ def __init__(

self.table.itemSelectionChanged.connect(self.preview_dataviz_dialog)

if qgis_version() >= 31400:
self.parent.dataviz_feature_picker.setShowBrowserButtons(True)
self.parent.dataviz_feature_picker.featureChanged.connect(self.preview_dataviz_dialog)
self.parent.dataviz_feature_picker.setShowBrowserButtons(True)
self.parent.dataviz_feature_picker.featureChanged.connect(self.preview_dataviz_dialog)

self.parent.enable_dataviz_preview.setText('')
self.parent.enable_dataviz_preview.setCheckable(True)
Expand Down

0 comments on commit 691f95b

Please sign in to comment.