[QGIS Commit] r11694 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Sep 21 10:35:29 EDT 2009
Author: esseffe
Date: 2009-09-21 10:35:27 -0400 (Mon, 21 Sep 2009)
New Revision: 11694
Modified:
trunk/qgis/src/app/qgsspatialitesourceselect.cpp
Log:
fixed a cuple of bugs - incorrect Spatialite's DB path handling
Modified: trunk/qgis/src/app/qgsspatialitesourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsspatialitesourceselect.cpp 2009-09-20 23:12:43 UTC (rev 11693)
+++ trunk/qgis/src/app/qgsspatialitesourceselect.cpp 2009-09-21 14:35:27 UTC (rev 11694)
@@ -181,7 +181,7 @@
// 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 @@
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 @@
{
QSettings settings;
QString subKey = cmbConnections->currentText();
- int idx = subKey.indexOf( " @ " );
+ int idx = subKey.indexOf( "@" );
if ( idx > 0 )
subKey.truncate( idx );
@@ -455,7 +454,7 @@
QSettings settings;
QString subKey = cmbConnections->currentText();
- int idx = subKey.indexOf( " @ " );
+ int idx = subKey.indexOf( "@" );
if ( idx > 0 )
subKey.truncate( idx );
More information about the QGIS-commit
mailing list