From 91024493ee9a9ada12d876b0c76de869bd3b376f Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 23 May 2012 11:27:37 -0400 Subject: [PATCH] Loaded plugins don't get loaded into the correct thread...fix this --- src/infoplugins/generic/hypem/HypemPlugin.cpp | 2 ++ src/libtomahawk/infosystem/InfoSystemWorker.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/infoplugins/generic/hypem/HypemPlugin.cpp b/src/infoplugins/generic/hypem/HypemPlugin.cpp index c4c3a23a1..20d92962b 100644 --- a/src/infoplugins/generic/hypem/HypemPlugin.cpp +++ b/src/infoplugins/generic/hypem/HypemPlugin.cpp @@ -30,6 +30,7 @@ #include "Typedefs.h" #include "TomahawkSettings.h" #include "utils/TomahawkUtils.h" +#include "infosystem/InfoSystemWorker.h" #include "utils/Logger.h" #include "Source.h" @@ -189,6 +190,7 @@ HypemPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData reque void HypemPlugin::notInCacheSlot( QHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData ) { + tDebug( LOGVERBOSE ) << "HypemPlugin thread: " << QThread::currentThread() << ", InfoSystemWorker thread: " << Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data()->currentThread(); switch ( requestData.type ) { case InfoChart: diff --git a/src/libtomahawk/infosystem/InfoSystemWorker.cpp b/src/libtomahawk/infosystem/InfoSystemWorker.cpp index d80e3c594..f84b55bbd 100644 --- a/src/libtomahawk/infosystem/InfoSystemWorker.cpp +++ b/src/libtomahawk/infosystem/InfoSystemWorker.cpp @@ -96,6 +96,7 @@ InfoSystemWorker::addInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin ) return; } + plugin.data()->moveToThread( this->thread() ); m_plugins.append( plugin ); registerInfoTypes( plugin, plugin.data()->supportedGetTypes(), plugin.data()->supportedPushTypes() );