Skip to content
Permalink
Browse files
fixed a cuple of bugs - incorrect Spatialite's DB path handling
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11694 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
esseffe committed Sep 21, 2009
1 parent af62f1c commit ad972f64e0216808b1a68ef257a4102dd00b9151
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/app/qgsspatialitesourceselect.cpp
@@ -181,7 +181,7 @@ sqlite3 *QgsSpatiaLiteSourceSelect::openSpatiaLiteDb( const char *path )
// trying to open the SQLite DB
mSqlitePath = QString::fromUtf8( path );

ret = sqlite3_open_v2( mSqlitePath.toUtf8().constData(), &handle, SQLITE_OPEN_READWRITE, NULL );
ret = sqlite3_open_v2( path, &handle, SQLITE_OPEN_READWRITE, NULL );
if ( ret )
{
// failure
@@ -290,9 +290,8 @@ void QgsSpatiaLiteSourceSelect::populateConnectionList()
while ( it != keys.end() )
{
// retrieving the SQLite DB name and full path
QString text = *it + tr( " @ " );
QString text = *it + tr( "@" );
text += settings.value( *it + "/sqlitepath", "###unknown###" ).toString();

cmbConnections->addItem( text );
++it;
}
@@ -360,7 +359,7 @@ void QgsSpatiaLiteSourceSelect::deleteConnection()
{
QSettings settings;
QString subKey = cmbConnections->currentText();
int idx = subKey.indexOf( " @ " );
int idx = subKey.indexOf( "@" );
if ( idx > 0 )
subKey.truncate( idx );

@@ -455,7 +454,7 @@ void QgsSpatiaLiteSourceSelect::on_btnConnect_clicked()

QSettings settings;
QString subKey = cmbConnections->currentText();
int idx = subKey.indexOf( " @ " );
int idx = subKey.indexOf( "@" );
if ( idx > 0 )
subKey.truncate( idx );

0 comments on commit ad972f6

Please sign in to comment.