mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Copy shared pointer while passing across threads
* Fixes TWK-1571
This commit is contained in:
parent
da8204fa7b
commit
ad07b285ee
@ -102,9 +102,9 @@ public slots:
|
||||
void setShuffled( bool enabled );
|
||||
|
||||
signals:
|
||||
void loading( const Tomahawk::result_ptr& track );
|
||||
void started( const Tomahawk::result_ptr& track );
|
||||
void finished( const Tomahawk::result_ptr& track );
|
||||
void loading( const Tomahawk::result_ptr track );
|
||||
void started( const Tomahawk::result_ptr track );
|
||||
void finished( const Tomahawk::result_ptr track );
|
||||
void stopped();
|
||||
void paused();
|
||||
void resumed();
|
||||
|
@ -797,7 +797,7 @@ PlayableModel::rootItem() const
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
PlayableModel::onPlaybackStarted( const Tomahawk::result_ptr result )
|
||||
{
|
||||
Q_D( PlayableModel );
|
||||
PlayableItem* oldEntry = itemFromIndex( d->currentIndex );
|
||||
|
@ -188,7 +188,7 @@ private slots:
|
||||
void onQueryBecamePlayable( bool playable );
|
||||
void onQueryResolved( bool hasResults );
|
||||
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr result );
|
||||
void onPlaybackStopped();
|
||||
|
||||
private:
|
||||
|
@ -62,7 +62,7 @@ QueueProxyModel::onIndexChanged( const QModelIndex& index )
|
||||
|
||||
|
||||
void
|
||||
QueueProxyModel::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
QueueProxyModel::onPlaybackStarted( const Tomahawk::result_ptr result )
|
||||
{
|
||||
for ( int i = 0; i < rowCount(); i++ )
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
private slots:
|
||||
void onIndexChanged( const QModelIndex& index );
|
||||
void onIndexActivated( const QModelIndex& index );
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr result );
|
||||
};
|
||||
|
||||
#endif // QUEUEPROXYMODEL_H
|
||||
|
@ -237,7 +237,7 @@ AudioControls::onControlStateChanged()
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
AudioControls::onPlaybackStarted( const Tomahawk::result_ptr result )
|
||||
{
|
||||
if ( result.isNull() )
|
||||
return;
|
||||
@ -273,7 +273,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result )
|
||||
{
|
||||
if ( !m_currentTrack.isNull() )
|
||||
{
|
||||
|
@ -65,8 +65,8 @@ protected:
|
||||
private slots:
|
||||
void phononTickCheckTimeout();
|
||||
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr result );
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr result );
|
||||
void onPlaybackPaused();
|
||||
void onPlaybackResumed();
|
||||
void onPlaybackSeeked( qint64 msec );
|
||||
|
@ -48,8 +48,8 @@ Scrobbler::Scrobbler( QObject* parent )
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr& ) ),
|
||||
SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
|
||||
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr ) ),
|
||||
SLOT( trackStarted( const Tomahawk::result_ptr ) ), Qt::QueuedConnection );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ),
|
||||
SLOT( trackPaused() ), Qt::QueuedConnection );
|
||||
@ -70,7 +70,7 @@ Scrobbler::~Scrobbler()
|
||||
|
||||
|
||||
void
|
||||
Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
Scrobbler::trackStarted( const Tomahawk::result_ptr track )
|
||||
{
|
||||
Q_ASSERT( QThread::currentThread() == thread() );
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
virtual ~Scrobbler();
|
||||
|
||||
public slots:
|
||||
void trackStarted( const Tomahawk::result_ptr& );
|
||||
void trackStarted( const Tomahawk::result_ptr );
|
||||
void trackPaused();
|
||||
void trackResumed();
|
||||
void trackStopped();
|
||||
|
@ -153,7 +153,7 @@ TomahawkTrayIcon::menuAboutToShow()
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::setResult( const Tomahawk::result_ptr& result )
|
||||
TomahawkTrayIcon::setResult( const Tomahawk::result_ptr result )
|
||||
{
|
||||
if ( m_currentTrack )
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
void setShowHideWindow( bool show = true );
|
||||
|
||||
public slots:
|
||||
void setResult( const Tomahawk::result_ptr& result );
|
||||
void setResult( const Tomahawk::result_ptr result );
|
||||
|
||||
private slots:
|
||||
void onAnimationTimer();
|
||||
|
@ -1286,7 +1286,7 @@ TomahawkWindow::audioStopped()
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
TomahawkWindow::onPlaybackLoading( const Tomahawk::result_ptr result )
|
||||
{
|
||||
m_currentTrack = result;
|
||||
setWindowTitle( m_windowTitle );
|
||||
|
@ -119,7 +119,7 @@ private slots:
|
||||
void onXSPFError( XSPFLoader::XSPFErrorCode error );
|
||||
void onXSPFOk( const Tomahawk::playlist_ptr& );
|
||||
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr result );
|
||||
|
||||
void audioStarted();
|
||||
void audioFinished();
|
||||
|
@ -66,8 +66,8 @@ XMPPBot::XMPPBot(QObject *parent)
|
||||
m_client.data()->registerMessageHandler(this);
|
||||
m_client.data()->setPresence(Presence::Available, 1, "Tomahawkbot available");
|
||||
|
||||
connect(AudioEngine::instance(), SIGNAL(started(const Tomahawk::result_ptr &)),
|
||||
SLOT(newTrackSlot(const Tomahawk::result_ptr &)));
|
||||
connect(AudioEngine::instance(), SIGNAL(started(const Tomahawk::result_ptr )),
|
||||
SLOT(newTrackSlot(const Tomahawk::result_ptr )));
|
||||
|
||||
connect(InfoSystem::instance(),
|
||||
SIGNAL(info(QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, QVariantMap)),
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
virtual ~XMPPBot();
|
||||
|
||||
public slots:
|
||||
virtual void newTrackSlot(const Tomahawk::result_ptr &track);
|
||||
virtual void newTrackSlot(const Tomahawk::result_ptr track);
|
||||
virtual void infoReturnedSlot(QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, QVariantMap customData);
|
||||
virtual void infoFinishedSlot(QString caller);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user