mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Mutex protect any m_db access within DatabaseImpl.
This commit is contained in:
@@ -126,6 +126,22 @@ DatabaseImpl::~DatabaseImpl()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TomahawkSqlQuery
|
||||||
|
DatabaseImpl::newquery()
|
||||||
|
{
|
||||||
|
QMutexLocker lock( &m_mutex );
|
||||||
|
return TomahawkSqlQuery( m_db );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QSqlDatabase&
|
||||||
|
DatabaseImpl::database()
|
||||||
|
{
|
||||||
|
QMutexLocker lock( &m_mutex );
|
||||||
|
return m_db;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DatabaseImpl*
|
DatabaseImpl*
|
||||||
DatabaseImpl::clone() const
|
DatabaseImpl::clone() const
|
||||||
{
|
{
|
||||||
|
@@ -50,8 +50,8 @@ public:
|
|||||||
|
|
||||||
DatabaseImpl* clone() const;
|
DatabaseImpl* clone() const;
|
||||||
|
|
||||||
TomahawkSqlQuery newquery() { return TomahawkSqlQuery( m_db ); }
|
TomahawkSqlQuery newquery();
|
||||||
QSqlDatabase& database() { return m_db; }
|
QSqlDatabase& database();
|
||||||
|
|
||||||
int artistId( const QString& name_orig, bool autoCreate ); //also for composers!
|
int artistId( const QString& name_orig, bool autoCreate ); //also for composers!
|
||||||
int trackId( int artistid, const QString& name_orig, bool autoCreate );
|
int trackId( int artistid, const QString& name_orig, bool autoCreate );
|
||||||
|
Reference in New Issue
Block a user