Skip to content

Commit 306efcb

Browse files
committed
reduce debugging noise
1 parent 63949b5 commit 306efcb

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/core/qgsscalecalculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void QgsScaleCalculator::setMapUnits( QGis::UnitType mapUnits )
4545

4646
QGis::UnitType QgsScaleCalculator::mapUnits() const
4747
{
48-
QgsDebugMsgLevel( QString( "Map units returned as %1" ).arg( QString::number( mMapUnits ) ), 3 );
48+
QgsDebugMsgLevel( QString( "Map units returned as %1" ).arg( QString::number( mMapUnits ) ), 4 );
4949
return mMapUnits;
5050
}
5151

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,13 @@ QgsVectorLayerImport::ImportError QgsPostgresProvider::createEmptyLayer(
186186
if ( primaryKeyType.isEmpty() )
187187
{
188188
primaryKeyType = "serial";
189-
/* TODO
190-
// check the feature count to choose if create a serial8 pk field
189+
#if 0
190+
// TODO: check the feature count to choose if create a serial8 pk field
191191
if ( layer->featureCount() > 0xFFFFFF )
192192
{
193193
primaryKeyType = "serial8";
194-
}*/
194+
}
195+
#endif
195196
}
196197

197198
try
@@ -1153,13 +1154,15 @@ qint64 QgsPostgresProvider::getBinaryInt( PGresult *queryResult, int row, int co
11531154
char *p = PQgetvalue( queryResult, row, col );
11541155
size_t s = PQgetlength( queryResult, row, col );
11551156

1157+
#ifdef QGISDEBUG
11561158
QString buf = "";
11571159
for ( size_t i = 0; i < s; i++ )
11581160
{
11591161
buf += QString( "%1 " ).arg( *( unsigned char * )( p + i ), 0, 16, QLatin1Char( ' ' ) );
11601162
}
11611163

1162-
QgsDebugMsgLevel( QString( "int in hex:%1" ).arg( buf ), 3 );
1164+
QgsDebugMsgLevel( QString( "int in hex:%1" ).arg( buf ), 4 );
1165+
#endif
11631166

11641167
switch ( s )
11651168
{
@@ -1191,18 +1194,18 @@ qint64 QgsPostgresProvider::getBinaryInt( PGresult *queryResult, int row, int co
11911194

11921195
if ( swapEndian )
11931196
{
1194-
QgsDebugMsg( QString( "swap oid0:%1 oid1:%2" ).arg( oid0 ).arg( oid1 ) );
1197+
QgsDebugMsgLevel( QString( "swap oid0:%1 oid1:%2" ).arg( oid0 ).arg( oid1 ), 4 );
11951198
oid0 = ntohl( oid0 );
11961199
oid1 = ntohl( oid1 );
11971200
}
11981201

1199-
QgsDebugMsg( QString( "oid0:%1 oid1:%2" ).arg( oid0 ).arg( oid1 ) );
1202+
QgsDebugMsgLevel( QString( "oid0:%1 oid1:%2" ).arg( oid0 ).arg( oid1 ), 4 );
12001203
oid = oid0;
1201-
QgsDebugMsg( QString( "oid:%1" ).arg( oid ) );
1204+
QgsDebugMsgLevel( QString( "oid:%1" ).arg( oid ), 4 );
12021205
oid <<= 32;
1203-
QgsDebugMsg( QString( "oid:%1" ).arg( oid ) );
1206+
QgsDebugMsgLevel( QString( "oid:%1" ).arg( oid ), 4 );
12041207
oid |= oid1;
1205-
QgsDebugMsg( QString( "oid:%1" ).arg( oid ) );
1208+
QgsDebugMsgLevel( QString( "oid:%1" ).arg( oid ), 4 );
12061209
}
12071210
break;
12081211

@@ -1226,7 +1229,7 @@ bool QgsPostgresProvider::getFeature( PGresult *queryResult, int row, bool fetch
12261229
try
12271230
{
12281231
QgsFeatureId oid = getBinaryInt( queryResult, row, 0 );
1229-
QgsDebugMsgLevel( QString( "oid=%1" ).arg( oid ), 3 );
1232+
QgsDebugMsgLevel( QString( "oid=%1" ).arg( oid ), 4 );
12301233

12311234
feature.setFeatureId( oid );
12321235
feature.clearAttributeMap();

0 commit comments

Comments
 (0)