Skip to content
Permalink
Browse files

typo and some QStringLiteral

  • Loading branch information
vcloarec authored and nyalldawson committed Jan 11, 2021
1 parent b7cf210 commit d82ff4bddb587f92b053c57965571d6db147bdb5
Showing with 8 additions and 8 deletions.
  1. +7 −7 src/providers/mssql/qgsmssqlconnection.cpp
  2. +1 −1 src/providers/mssql/qgsmssqlnewconnection.h
@@ -476,19 +476,19 @@ QList<QgsVectorDataProvider::NativeType> QgsMssqlConnection::nativeTypes()
QStringList QgsMssqlConnection::excludedSchemasList( const QString &connName )
{
QgsSettings settings;
QString databaseName = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + "/database" ).toString();
QString databaseName = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/database" ) ).toString();

return excludedSchemasList( connName, databaseName );
}

QStringList QgsMssqlConnection::excludedSchemasList( const QString &connName, const QString &database )
{
QgsSettings settings;
bool schemaFilteringEnabled = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + "/schemasFiltering" ).toBool();
bool schemaFilteringEnabled = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/schemasFiltering" ) ).toBool();

if ( schemaFilteringEnabled )
{
QVariant schemaSettingsVariant = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + "/excludedSchemas" );
QVariant schemaSettingsVariant = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/excludedSchemas" ) );

if ( schemaSettingsVariant.type() == QVariant::Map )
{
@@ -505,19 +505,19 @@ void QgsMssqlConnection::setExcludedSchemasList( const QString &connName, const
{
QgsSettings settings;

QString currentDatabaseName = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + "/database" ).toString();
QString currentDatabaseName = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/database" ) ).toString();
setExcludedSchemasList( connName, currentDatabaseName, excludedSchemas );
}

void QgsMssqlConnection::setExcludedSchemasList( const QString &connName, const QString &database, const QStringList &excludedSchemas )
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/MSSQL/connections/" ) + connName + "/schemasFiltering", excludedSchemas.isEmpty() ? 0 : 1 );
settings.setValue( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/schemasFiltering" ), excludedSchemas.isEmpty() ? 0 : 1 );

QVariant schemaSettingsVariant = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + "/excludedSchemas" );
QVariant schemaSettingsVariant = settings.value( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/excludedSchemas" ) );
QVariantMap schemaSettings = schemaSettingsVariant.toMap();
schemaSettings.insert( database, excludedSchemas );
settings.setValue( QStringLiteral( "/MSSQL/connections/" ) + connName + "/excludedSchemas", schemaSettings );
settings.setValue( QStringLiteral( "/MSSQL/connections/" ) + connName + QStringLiteral( "/excludedSchemas" ), schemaSettings );
}

QString QgsMssqlConnection::buildQueryForTables( bool allowTablesWithNoGeometry, bool geometryColumnOnly, const QStringList &excludedSchemaList )
@@ -65,7 +65,7 @@ class QgsMssqlNewConnection : public QDialog, private Ui::QgsMssqlNewConnectionB
//! Returns the unchecked schemas
QStringList uncheckedSchemas() const;

//! Returns the database nale represented by the model
//! Returns the database name represented by the model
QString dataBaseName() const;

//! Sets the database nale represented by the model

0 comments on commit d82ff4b

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