mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Fixed Source method being run in the wrong thread.
This commit is contained in:
parent
89009c09be
commit
6552deca61
@ -350,6 +350,12 @@ Source::trackTimerFired()
|
||||
void
|
||||
Source::addCommand( const QSharedPointer<DatabaseCommand>& command )
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
QMetaObject::invokeMethod( this, "addCommand", Qt::QueuedConnection, Q_ARG( const QSharedPointer<DatabaseCommand>, command ) );
|
||||
return;
|
||||
}
|
||||
|
||||
m_cmds << command;
|
||||
if ( !command->singletonCmd() )
|
||||
m_lastCmdGuid = command->guid();
|
||||
@ -363,7 +369,6 @@ Source::executeCommands()
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
tDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||
QMetaObject::invokeMethod( this, "executeCommands", Qt::QueuedConnection );
|
||||
return;
|
||||
}
|
||||
|
@ -129,9 +129,9 @@ private slots:
|
||||
void trackTimerFired();
|
||||
|
||||
void executeCommands();
|
||||
void addCommand( const QSharedPointer<DatabaseCommand>& command );
|
||||
|
||||
private:
|
||||
void addCommand( const QSharedPointer<DatabaseCommand>& command );
|
||||
void updateTracks();
|
||||
void reportSocialAttributesChanged( DatabaseCommand_SocialAction* action );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user