Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 d10c023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsuserprofile.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit d10c023

Please sign in to comment.