1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +02:00

* Use unique db connection names.

This commit is contained in:
Christian Muehlhaeuser 2012-06-21 00:04:46 +02:00
parent d687bdb54f
commit 55537ce5f8

View File

@ -706,8 +706,12 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
bool
DatabaseImpl::openDatabase( const QString& dbname, bool checkSchema )
{
const QStringList conns = QSqlDatabase::connectionNames();
const QString connName = QString( "tomahawk%1" ).arg( conns.count() ? QString::number( conns.count() ) : "" );
QString connName( "tomahawk" );
if ( !checkSchema )
{
// secondary connection, use a unique connection name
connName += "_" + uuid();
}
bool schemaUpdated = false;
int version = -1;