Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Even less chatty
  • Loading branch information
nyalldawson committed May 14, 2020
1 parent 2e10281 commit 098c578
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -703,7 +703,7 @@ void QgsMssqlProvider::UpdateStatistics( bool estimate ) const
!query.value( 2 ).isNull() ||
!query.value( 3 ).isNull() ) )
{
QgsDebugMsg( QStringLiteral( "Found extents in spatial index" ) );
QgsDebugMsgLevel( QStringLiteral( "Found extents in spatial index" ), 2 );
mExtent.setXMinimum( query.value( 0 ).toDouble() );
mExtent.setYMinimum( query.value( 1 ).toDouble() );
mExtent.setXMaximum( query.value( 2 ).toDouble() );
Expand Down Expand Up @@ -2121,7 +2121,7 @@ bool QgsMssqlProviderMetadata::saveStyle( const QString &uri, const QString &qml
}
if ( query.isActive() && query.next() && query.value( 0 ).toInt() == 0 )
{
QgsDebugMsg( QStringLiteral( "Need to create styles table" ) );
QgsDebugMsgLevel( QStringLiteral( "Need to create styles table" ), 2 );
bool execOk = query.exec( QString( "CREATE TABLE [dbo].[layer_styles]("
"[id] int IDENTITY(1,1) PRIMARY KEY,"
"[f_table_catalog] [varchar](1024) NULL,"
Expand Down Expand Up @@ -2153,7 +2153,7 @@ bool QgsMssqlProviderMetadata::saveStyle( const QString &uri, const QString &qml
uiFileColumn = QStringLiteral( ",ui" );
uiFileValue = QStringLiteral( ",XMLPARSE(DOCUMENT %1)" ).arg( uiFileContent );
}
QgsDebugMsg( QStringLiteral( "Ready to insert new style" ) );
QgsDebugMsgLevel( QStringLiteral( "Ready to insert new style" ), 2 );
// Note: in the construction of the INSERT and UPDATE strings the qmlStyle and sldStyle values
// can contain user entered strings, which may themselves include %## values that would be
// replaced by the QString.arg function. To ensure that the final SQL string is not corrupt these
Expand Down Expand Up @@ -2208,7 +2208,7 @@ bool QgsMssqlProviderMetadata::saveStyle( const QString &uri, const QString &qml
return false;
}

QgsDebugMsg( QStringLiteral( "Updating styles" ) );
QgsDebugMsgLevel( QStringLiteral( "Updating styles" ), 2 );
sql = QString( "UPDATE layer_styles "
" SET useAsDefault=%1"
",styleQML=%2"
Expand Down Expand Up @@ -2246,8 +2246,8 @@ bool QgsMssqlProviderMetadata::saveStyle( const QString &uri, const QString &qml
sql = QStringLiteral( "%1; %2;" ).arg( removeDefaultSql, sql );
}

QgsDebugMsg( QStringLiteral( "Inserting styles" ) );
QgsDebugMsg( sql );
QgsDebugMsgLevel( QStringLiteral( "Inserting styles" ), 2 );
QgsDebugMsgLevel( sql, 2 );
bool execOk = query.exec( sql );

if ( !execOk )
Expand Down Expand Up @@ -2352,7 +2352,7 @@ int QgsMssqlProviderMetadata::listStyles( const QString &uri, QStringList &ids,
int numberOfRelatedStyles = 0;
while ( query.isActive() && query.next() )
{
QgsDebugMsg( query.value( 1 ).toString() );
QgsDebugMsgLevel( query.value( 1 ).toString(), 2 );
ids.append( query.value( 0 ).toString() );
names.append( query.value( 1 ).toString() );
descriptions.append( query.value( 2 ).toString() );
Expand All @@ -2366,14 +2366,14 @@ int QgsMssqlProviderMetadata::listStyles( const QString &uri, QStringList &ids,
.arg( QgsMssqlProvider::quotedValue( dsUri.schema() ) )
.arg( QgsMssqlProvider::quotedValue( dsUri.table() ) )
.arg( QgsMssqlProvider::quotedValue( dsUri.geometryColumn() ) );
QgsDebugMsg( selectOthersQuery );
QgsDebugMsgLevel( selectOthersQuery, 2 );
queryOk = query.exec( selectOthersQuery );
if ( !queryOk )
{
QgsDebugMsg( query.lastError().text() );
return -1;
}
QgsDebugMsg( query.isActive() && query.size() );
QgsDebugMsgLevel( query.isActive() && query.size(), 2 );
while ( query.next() )
{
ids.append( query.value( 0 ).toString() );
Expand Down

0 comments on commit 098c578

Please sign in to comment.