From 3c7d73d4aef202291fed5de6a91fe591aba242f7 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 7 Nov 2011 15:25:48 -0500 Subject: [PATCH] Use queuedconnection for both types of connections for latching, which makes both work well (eventually, figure out where the bug is that makes this required) --- src/sourcetree/sourcetreeview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sourcetree/sourcetreeview.cpp b/src/sourcetree/sourcetreeview.cpp index f28af0760..8241743f0 100644 --- a/src/sourcetree/sourcetreeview.cpp +++ b/src/sourcetree/sourcetreeview.cpp @@ -81,8 +81,8 @@ SourceTreeView::SourceTreeView( QWidget* parent ) // setAnimated( true ); m_delegate = new SourceDelegate( this ); - connect( m_delegate, SIGNAL( latchOn( Tomahawk::source_ptr ) ), this, SLOT( latchOnOrCatchUp( Tomahawk::source_ptr ) ) ); - connect( m_delegate, SIGNAL( latchOff( Tomahawk::source_ptr ) ), this, SLOT( latchOff( Tomahawk::source_ptr ) ) ); + connect( m_delegate, SIGNAL( latchOn( Tomahawk::source_ptr ) ), this, SLOT( latchOnOrCatchUp( Tomahawk::source_ptr ) ), Qt::QueuedConnection ); + connect( m_delegate, SIGNAL( latchOff( Tomahawk::source_ptr ) ), this, SLOT( latchOff( Tomahawk::source_ptr ) ), Qt::QueuedConnection ); setItemDelegate( m_delegate ); @@ -156,7 +156,7 @@ SourceTreeView::setupMenus() m_latchMenu.addSeparator(); QAction *latchOffAction = ActionCollection::instance()->getAction( "latchOff" ); m_latchMenu.addAction( latchOffAction ); - connect( latchOffAction, SIGNAL( triggered() ), SLOT( latchOff() ) ); + connect( latchOffAction, SIGNAL( triggered() ), SLOT( latchOff() ), Qt::QueuedConnection ); } } } @@ -191,7 +191,7 @@ SourceTreeView::setupMenus() connect( m_deletePlaylistAction, SIGNAL( triggered() ), SLOT( deletePlaylist() ) ); connect( m_copyPlaylistAction, SIGNAL( triggered() ), SLOT( copyPlaylistLink() ) ); connect( m_addToLocalAction, SIGNAL( triggered() ), SLOT( addToLocal() ) ); - connect( latchOnAction, SIGNAL( triggered() ), SLOT( latchOnOrCatchUp() ) ); + connect( latchOnAction, SIGNAL( triggered() ), SLOT( latchOnOrCatchUp() ), Qt::QueuedConnection ); }