Skip to content

Commit 93613af

Browse files
author
homann
committed
Changed debug output to use QgsDebugMsg()
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11496 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d5a9385 commit 93613af

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/core/qgscoordinatereferencesystem.cpp

+10-13
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void QgsCoordinateReferenceSystem::createFromId( const long theId, CrsType theTy
9191
break;
9292
default:
9393
//THIS IS BAD...THIS PART OF CODE SHOULD NEVER BE REACHED...
94-
QgsLogger::critical( "Unexpected case reached in " + QString( __FILE__ ) + " : " + QString( __LINE__ ) );
94+
QgsDebugMsg( "Unexpected case reached!" );
9595
};
9696
}
9797

@@ -253,7 +253,6 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
253253
if ( theWkt.isEmpty() )
254254
{
255255
QgsDebugMsg( "theWkt is uninitialised, operation failed" );
256-
QgsLogger::critical( "QgsCoordinateReferenceSystem::createFromWkt -- theWkt is uninitialised, operation failed" );
257256
return mIsValidFlag;
258257
}
259258
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromWkt(QString theWkt) using: " + theWkt );
@@ -338,8 +337,7 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
338337
myStart = myAxisRegExp.indexIn( theProj4String, myStart );
339338
if ( myStart == -1 && mEllipsoidAcronym.isNull() )
340339
{
341-
QgsLogger::warning( "QgsCoordinateReferenceSystem::createFromProj4 error"
342-
" proj string supplied has no +ellps or +a argument" );
340+
QgsDebugMsg( "proj string supplied has no +ellps or +a argument" );
343341
return mIsValidFlag;
344342
}
345343

@@ -531,7 +529,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
531529
myFileInfo.setFile( myDatabaseFileName );
532530
if ( !myFileInfo.exists( ) )
533531
{
534-
QgsLogger::warning( "QgsCoordinateReferenceSystem::getRecord failed : users qgis.db not found" );
532+
QgsDebugMsg( "users qgis.db not found" );
535533
return myMap;
536534
}
537535

@@ -557,7 +555,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
557555
}
558556
else
559557
{
560-
QgsLogger::warning( "QgsCoordinateReferenceSystem::getRecord failed : " + theSql );
558+
QgsDebugMsg( "failed : " + theSql );
561559

562560
}
563561
}
@@ -743,7 +741,7 @@ void QgsCoordinateReferenceSystem::setMapUnits()
743741
mMapUnits = QGis::Feet;
744742
else
745743
{
746-
QgsLogger::warning( "Unsupported map units of " + unit );
744+
QgsDebugMsg( "Unsupported map units of " + unit );
747745
mMapUnits = QGis::UnknownUnit;
748746
}
749747
}
@@ -755,7 +753,7 @@ void QgsCoordinateReferenceSystem::setMapUnits()
755753
mMapUnits = QGis::Degrees;
756754
else
757755
{
758-
QgsLogger::warning( "Unsupported map units of " + unit );
756+
QgsDebugMsg( "Unsupported map units of " + unit );
759757
mMapUnits = QGis::UnknownUnit;
760758
}
761759
QgsDebugMsg( "Projection has angular units of " + unit );
@@ -822,8 +820,7 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
822820
}
823821
}
824822
}
825-
QgsLogger::warning( "QgsCoordinateReferenceSystem::findMatchingProj ------->"
826-
"\n no match found in srs.db, trying user db now!" );
823+
QgsDebugMsg( "no match found in srs.db, trying user db now!" );
827824
// close the sqlite3 statement
828825
sqlite3_finalize( myPreparedStatement );
829826
sqlite3_close( myDatabase );
@@ -862,7 +859,7 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
862859
}
863860
}
864861
}
865-
QgsLogger::warning( "QgsCoordinateReferenceSystem::findMatchingProj -------> no match found in user db" );
862+
QgsDebugMsg( "no match found in user db" );
866863

867864
// close the sqlite3 statement
868865
sqlite3_finalize( myPreparedStatement );
@@ -1078,7 +1075,7 @@ QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId )
10781075
myFileInfo.setFile( myDatabaseFileName );
10791076
if ( !myFileInfo.exists( ) ) //its unlikely that this condition will ever be reached
10801077
{
1081-
QgsLogger::critical( "QgsCoordinateReferenceSystem::getProj4FromSrsId : users qgis.db not found" );
1078+
QgsDebugMsg( "users qgis.db not found" );
10821079
return NULL;
10831080
}
10841081
}
@@ -1125,7 +1122,7 @@ int QgsCoordinateReferenceSystem::openDb( QString path, sqlite3 **db )
11251122

11261123
if ( myResult )
11271124
{
1128-
QgsLogger::critical( "Can't open database: " + QString( sqlite3_errmsg( *db ) ) );
1125+
QgsDebugMsg( "Can't open database: " + QString( sqlite3_errmsg( *db ) ) );
11291126
// XXX This will likely never happen since on open, sqlite creates the
11301127
// database if it does not exist.
11311128
// ... unfortunately it happens on Windows

0 commit comments

Comments
 (0)