mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Use unique db connection names.
This commit is contained in:
@@ -706,8 +706,12 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
|
|||||||
bool
|
bool
|
||||||
DatabaseImpl::openDatabase( const QString& dbname, bool checkSchema )
|
DatabaseImpl::openDatabase( const QString& dbname, bool checkSchema )
|
||||||
{
|
{
|
||||||
const QStringList conns = QSqlDatabase::connectionNames();
|
QString connName( "tomahawk" );
|
||||||
const QString connName = QString( "tomahawk%1" ).arg( conns.count() ? QString::number( conns.count() ) : "" );
|
if ( !checkSchema )
|
||||||
|
{
|
||||||
|
// secondary connection, use a unique connection name
|
||||||
|
connName += "_" + uuid();
|
||||||
|
}
|
||||||
|
|
||||||
bool schemaUpdated = false;
|
bool schemaUpdated = false;
|
||||||
int version = -1;
|
int version = -1;
|
||||||
|
Reference in New Issue
Block a user