Skip to content
Permalink
Browse files

QgsSettings: homogenize "qgis" keys

  • Loading branch information
elpaso committed Mar 8, 2017
1 parent 1822caa commit 573947896beae4fa88d314c09e4341e7d8836396
@@ -9321,7 +9321,7 @@ void QgisApp::apiDocumentation()
else
{
QgsSettings settings;
QString QgisApiUrl = settings.value( QStringLiteral( "Qgis/QgisApiUrl" ),
QString QgisApiUrl = settings.value( QStringLiteral( "qgis/QgisApiUrl" ),
QStringLiteral( "https://qgis.org/api/" ) ).toString();
openURL( QgisApiUrl, false );
}
@@ -9330,23 +9330,23 @@ void QgisApp::apiDocumentation()
void QgisApp::reportaBug()
{
QgsSettings settings;
QString reportaBugUrl = settings.value( QStringLiteral( "Qgis/reportaBugUrl" ),
QString reportaBugUrl = settings.value( QStringLiteral( "qgis/reportaBugUrl" ),
tr( "https://qgis.org/en/site/getinvolved/development/bugreporting.html" ) ).toString();
openURL( reportaBugUrl, false );
}

void QgisApp::supportProviders()
{
QgsSettings settings;
QString supportProvidersUrl = settings.value( QStringLiteral( "Qgis/supportProvidersUrl" ),
QString supportProvidersUrl = settings.value( QStringLiteral( "qgis/supportProvidersUrl" ),
tr( "https://qgis.org/en/site/forusers/commercial_support.html" ) ).toString();
openURL( supportProvidersUrl, false );
}

void QgisApp::helpQgisHomePage()
{
QgsSettings settings;
QString helpQgisHomePageUrl = settings.value( QStringLiteral( "Qgis/helpQgisHomePageUrl" ),
QString helpQgisHomePageUrl = settings.value( QStringLiteral( "qgis/helpQgisHomePageUrl" ),
QStringLiteral( "https://qgis.org" ) ).toString();
openURL( helpQgisHomePageUrl, false );
}
@@ -124,20 +124,20 @@ QgsDataSourceUri QgsWMSConnection::uri()
QStringList QgsWMSConnection::connectionList()
{
QgsSettings settings;
settings.beginGroup( QStringLiteral( "Qgis/connections-wms" ) );
settings.beginGroup( QStringLiteral( "qgis/connections-wms" ) );
return settings.childGroups();
}

QString QgsWMSConnection::selectedConnection()
{
QgsSettings settings;
return settings.value( QStringLiteral( "Qgis/connections-wms/selected" ) ).toString();
return settings.value( QStringLiteral( "qgis/connections-wms/selected" ) ).toString();
}

void QgsWMSConnection::setSelectedConnection( const QString &name )
{
QgsSettings settings;
settings.setValue( QStringLiteral( "Qgis/connections-wms/selected" ), name );
settings.setValue( QStringLiteral( "qgis/connections-wms/selected" ), name );
}

void QgsWMSConnection::deleteConnection( const QString &name )
@@ -1102,7 +1102,7 @@ void QgsWMSSourceSelect::addDefaultServers()
exampleServers[QStringLiteral( "GeoServer Demo - World" )] = QStringLiteral( "http://tiles.boundlessgeo.com/" );

QgsSettings settings;
settings.beginGroup( QStringLiteral( "Qgis/connections-wms" ) );
settings.beginGroup( QStringLiteral( "qgis/connections-wms" ) );
QMap<QString, QString>::const_iterator i = exampleServers.constBegin();
for ( ; i != exampleServers.constEnd(); ++i )
{
@@ -1234,7 +1234,7 @@ void QgsWMSSourceSelect::on_btnAddWMS_clicked()
}

// add selected WMS to config and mark as current
settings.setValue( QStringLiteral( "Qgis/connections-wms/%1/url" ).arg( wmsTitle ), wmsUrl );
settings.setValue( QStringLiteral( "qgis/connections-wms/%1/url" ).arg( wmsTitle ), wmsUrl );
QgsWMSConnection::setSelectedConnection( wmsTitle );
populateConnectionList();

@@ -33,7 +33,7 @@ QString QgsXyzConnection::encodedUri() const
QStringList QgsXyzConnectionUtils::connectionList()
{
QgsSettings settings;
settings.beginGroup( QStringLiteral( "Qgis/connections-xyz" ) );
settings.beginGroup( QStringLiteral( "qgis/connections-xyz" ) );
return settings.childGroups();
}

0 comments on commit 5739478

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