@@ -181,7 +181,7 @@ sqlite3 *QgsSpatiaLiteSourceSelect::openSpatiaLiteDb( const char *path )
181
181
// trying to open the SQLite DB
182
182
mSqlitePath = QString::fromUtf8 ( path );
183
183
184
- ret = sqlite3_open_v2 ( mSqlitePath . toUtf8 (). constData () , &handle, SQLITE_OPEN_READWRITE, NULL );
184
+ ret = sqlite3_open_v2 ( path , &handle, SQLITE_OPEN_READWRITE, NULL );
185
185
if ( ret )
186
186
{
187
187
// failure
@@ -290,9 +290,8 @@ void QgsSpatiaLiteSourceSelect::populateConnectionList()
290
290
while ( it != keys.end () )
291
291
{
292
292
// retrieving the SQLite DB name and full path
293
- QString text = *it + tr ( " @ " );
293
+ QString text = *it + tr ( " @ " );
294
294
text += settings.value ( *it + " /sqlitepath" , " ###unknown###" ).toString ();
295
-
296
295
cmbConnections->addItem ( text );
297
296
++it;
298
297
}
@@ -360,7 +359,7 @@ void QgsSpatiaLiteSourceSelect::deleteConnection()
360
359
{
361
360
QSettings settings;
362
361
QString subKey = cmbConnections->currentText ();
363
- int idx = subKey.indexOf ( " @ " );
362
+ int idx = subKey.indexOf ( " @ " );
364
363
if ( idx > 0 )
365
364
subKey.truncate ( idx );
366
365
@@ -455,7 +454,7 @@ void QgsSpatiaLiteSourceSelect::on_btnConnect_clicked()
455
454
456
455
QSettings settings;
457
456
QString subKey = cmbConnections->currentText ();
458
- int idx = subKey.indexOf ( " @ " );
457
+ int idx = subKey.indexOf ( " @ " );
459
458
if ( idx > 0 )
460
459
subKey.truncate ( idx );
461
460
0 commit comments