From f9b3a6c5836376d45878b7c9b77a9e23ea810d26 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Tue, 14 Jan 2025 17:28:20 +0100 Subject: [PATCH] qgsnewhttpconnection: Always enable paging options for WFS 1.1 Paging support is only handled by WFS 2.0. However, some servers handle paging even if they only expose WFS 1.1. At the moment, when changing the version number, it has the following effect on the paging options: - "maximum": both options can be enabled - "2.0": both options can be enabled - "1.1": both options can be enabled - "1.0": "feature paging" option is always disabled but the "page size" option can be enabled With this change, both paging options can be enabled for version 1.1. This allows to try to enable paging for WFS 1.1 if the server handles it. --- src/gui/qgsnewhttpconnection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/qgsnewhttpconnection.cpp b/src/gui/qgsnewhttpconnection.cpp index a444bc43d930..3327a5f4c6d7 100644 --- a/src/gui/qgsnewhttpconnection.cpp +++ b/src/gui/qgsnewhttpconnection.cpp @@ -187,10 +187,10 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ void QgsNewHttpConnection::wfsVersionCurrentIndexChanged( int index ) { // For now 2019-06-06, leave paging checkable for some WFS version 1.1 servers with support - cmbFeaturePaging->setEnabled( index == WFS_VERSION_MAX || index >= WFS_VERSION_2_0 ); - const bool pagingNotDisabled = cmbFeaturePaging->currentIndex() != static_cast( QgsNewHttpConnection::WfsFeaturePagingIndex::DISABLED ); - lblPageSize->setEnabled( pagingNotDisabled && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) ); - txtPageSize->setEnabled( pagingNotDisabled && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) ); + const bool pagingOptionsEnabled = ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ); + cmbFeaturePaging->setEnabled( pagingOptionsEnabled ); + lblPageSize->setEnabled( pagingOptionsEnabled ); + txtPageSize->setEnabled( pagingOptionsEnabled ); cbxWfsIgnoreAxisOrientation->setEnabled( index != WFS_VERSION_1_0 && index != WFS_VERSION_API_FEATURES_1_0 ); cbxWfsInvertAxisOrientation->setEnabled( index != WFS_VERSION_API_FEATURES_1_0 ); wfsUseGml2EncodingForTransactions()->setEnabled( index == WFS_VERSION_1_1 );