Skip to content
Permalink
Browse files

Even less chatty

  • Loading branch information
nyalldawson committed May 13, 2020
1 parent 2e10281 commit 098c5786d0f4ded882e4557fb0569a40fc372273
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/providers/mssql/qgsmssqlprovider.cpp
@@ -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() );
@@ -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,"
@@ -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
@@ -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"
@@ -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 )
@@ -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() );
@@ -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() );

0 comments on commit 098c578

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