Skip to content
Permalink
Browse files
fix #2670
git-svn-id: http://svn.osgeo.org/qgis/trunk@13508 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 16, 2010
1 parent 6121eea commit f12eb06aa2bff18e5fdd31ba8b050bfa1c1b90ee
Showing with 6 additions and 11 deletions.
  1. +6 −11 src/core/qgscoordinatereferencesystem.cpp
@@ -31,7 +31,6 @@
#include "qgsmessageoutput.h"
#include "qgis.h" //const vals declared here

#include <cassert>
#include <sqlite3.h>

//gdal and ogr includes (needed for == operator)
@@ -1145,7 +1144,7 @@ QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId )
// close the database
sqlite3_close( db );

//assert(myProjString.length() > 0);
//Q_ASSERT(myProjString.length() > 0);
return myProjString;
}

@@ -1259,12 +1258,10 @@ bool QgsCoordinateReferenceSystem::saveAsUserCRS()
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " )
.arg( sqlite3_errmsg( myDatabase ) )
.arg( QgsApplication::qgisUserDbFilePath() ) );
// XXX This will likely never happen since on open, sqlite creates the
// database if it does not exist.
assert( myResult == SQLITE_OK );
QgsDebugMsg( QString( "Can't open or create database %1: %2" )
.arg( QgsApplication::qgisUserDbFilePath() )
.arg( sqlite3_errmsg( myDatabase ) ) );
return false;
}
QgsDebugMsg( QString( "Update or insert sql \n%1" ).arg( mySql ) );
myResult = sqlite3_prepare( myDatabase, mySql.toUtf8(), mySql.toUtf8().length(), &myPreparedStatement, &myTail );
@@ -1285,9 +1282,7 @@ long QgsCoordinateReferenceSystem::getRecordCount()
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
// XXX This will likely never happen since on open, sqlite creates the
// database if it does not exist.
assert( myResult == SQLITE_OK );
return 0;
}
// Set up the query to retrieve the projection information needed to populate the ELLIPSOID list
QString mySql = "select count(*) from tbl_srs";

0 comments on commit f12eb06

Please sign in to comment.