Skip to content
Permalink
Browse files

WMS provider: use 'WMS/WMTS' instead of 'WMS' in various UI labels (f…

…ixes #18883)
  • Loading branch information
rouault committed May 24, 2018
1 parent dde895d commit 3e436094f6dede200d934583424d4b559b89258f
@@ -36,7 +36,14 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ

QRegExp rx( "/connections-([^/]+)/" );
if ( rx.indexIn( baseKey ) != -1 )
setWindowTitle( tr( "Create a New %1 Connection" ).arg( rx.cap( 1 ).toUpper() ) );
{
QString connectionType( rx.cap( 1 ).toUpper() );
if ( connectionType == QLatin1String( "WMS" ) )
{
connectionType = QStringLiteral( "WMS/WMTS" );
}
setWindowTitle( tr( "Create a New %1 Connection" ).arg( connectionType ) );
}

// It would be obviously much better to use mBaseKey also for credentials,
// but for some strange reason a different hardcoded key was used instead.
@@ -422,7 +422,7 @@ QgsDataItem *QgsWmsDataItemProvider::createDataItem( const QString &path, QgsDat
QgsDebugMsg( "path = " + path );
if ( path.isEmpty() )
{
return new QgsWMSRootItem( parentItem, QStringLiteral( "WMS" ), QStringLiteral( "wms:" ) );
return new QgsWMSRootItem( parentItem, QStringLiteral( "WMS/WMTS" ), QStringLiteral( "wms:" ) );
}

// path schema: wms:/connection name (used by OWS)
@@ -432,7 +432,7 @@ QgsDataItem *QgsWmsDataItemProvider::createDataItem( const QString &path, QgsDat
if ( QgsWMSConnection::connectionList().contains( connectionName ) )
{
QgsWMSConnection connection( connectionName );
return new QgsWMSConnectionItem( parentItem, QStringLiteral( "WMS" ), path, connection.uri().encodedUri() );
return new QgsWMSConnectionItem( parentItem, QStringLiteral( "WMS/WMTS" ), path, connection.uri().encodedUri() );
}
}

@@ -4240,7 +4240,7 @@ class QgsWmsSourceSelectProvider : public QgsSourceSelectProvider
public:

QString providerKey() const override { return QStringLiteral( "wms" ); }
QString text() const override { return QObject::tr( "WMS" ); }
QString text() const override { return QObject::tr( "WMS/WMTS" ); }
int ordering() const override { return QgsSourceSelectProvider::OrderRemoteProvider + 10; }
QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddWmsLayer.svg" ) ); }
QgsAbstractDataSourceWidget *createDataSourceWidget( QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Embedded ) const override
@@ -118,7 +118,7 @@
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="mWmsOptionsGroupBox">
<property name="title">
<string>WMS Options</string>
<string>WMS/WMTS Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="5" column="0" colspan="2">

0 comments on commit 3e43609

Please sign in to comment.
You can’t perform that action at this time.