Skip to content
Permalink
Browse files

Use connection name to avoid closing default connection

No observable bad effects identified but the following warning looks suspicious:

  Warning: QSqlDatabasePrivate::addDatabase: duplicate connection name qt_sql_default_connection, old connection removed.
  • Loading branch information
m-kuhn committed May 15, 2018
1 parent cd34da8 commit d10c0232fe6268a55fd552a0232949ad07d4ec7a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsuserprofile.cpp
@@ -67,7 +67,7 @@ const QString QgsUserProfile::alias() const
return name();
}

QSqlDatabase db = QSqlDatabase::addDatabase( QStringLiteral( "QSQLITE" ) );
QSqlDatabase db = QSqlDatabase::addDatabase( QStringLiteral( "QSQLITE" ), QStringLiteral( "userprofile" ) );
db.setDatabaseName( qgisDB() );
if ( !db.open() )
return name();

0 comments on commit d10c023

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