Skip to content
Permalink
Browse files

fix #1857

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11477 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Aug 22, 2009
1 parent 3f33638 commit 934b69d6518fe515553fa9209f7dc7833b74a364
Showing with 3 additions and 5 deletions.
  1. +2 −2 src/app/qgsspatialitesourceselect.cpp
  2. +1 −3 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -179,9 +179,9 @@ sqlite3 *QgsSpatiaLiteSourceSelect::openSpatiaLiteDb( const char *path )
QString errCause;

// trying to open the SQLite DB
mSqlitePath = path;
mSqlitePath = QString::fromUtf8( path );

ret = sqlite3_open_v2( path, &handle, SQLITE_OPEN_READWRITE, NULL );
ret = sqlite3_open_v2( mSqlitePath.toUtf8().constData(), &handle, SQLITE_OPEN_READWRITE, NULL );
if ( ret )
{
// failure
@@ -1365,7 +1365,6 @@ void QgsSpatiaLiteProvider::closeDb()

QgsSpatiaLiteProvider::SqliteHandles * QgsSpatiaLiteProvider::SqliteHandles::openDb( const QString & dbPath )
{
char path[1024];
sqlite3 *sqlite_handle;

QMap < QString, QgsSpatiaLiteProvider::SqliteHandles * >&handles = QgsSpatiaLiteProvider::SqliteHandles::handles;
@@ -1378,8 +1377,7 @@ QgsSpatiaLiteProvider::SqliteHandles * QgsSpatiaLiteProvider::SqliteHandles::ope
}

QgsDebugMsg( QString( "New sqlite connection for " ) + dbPath );
strcpy( path, dbPath.toUtf8().constData() );
if ( sqlite3_open_v2( path, &sqlite_handle, SQLITE_OPEN_READWRITE, NULL ) )
if ( sqlite3_open_v2( dbPath.toUtf8().constData(), &sqlite_handle, SQLITE_OPEN_READWRITE, NULL ) )
{
// failure

0 comments on commit 934b69d

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