diff --git a/src/libtomahawk/infosystem/infosystem.h b/src/libtomahawk/infosystem/infosystem.h index ff40c674a..2e95aff1f 100644 --- a/src/libtomahawk/infosystem/infosystem.h +++ b/src/libtomahawk/infosystem/infosystem.h @@ -127,6 +127,7 @@ enum InfoType { // as items are saved in cache, mark them here to not change the struct InfoRequestData { quint64 requestId; + quint64 internalId; //do not assign to this; it may get overwritten by the InfoSystem QString caller; Tomahawk::InfoSystem::InfoType type; QVariant input; @@ -134,6 +135,7 @@ struct InfoRequestData { InfoRequestData() : requestId( TomahawkUtils::infosystemRequestId() ) + , internalId( TomahawkUtils::infosystemRequestId() ) , caller( QString() ) , type( Tomahawk::InfoSystem::InfoNoInfo ) , input( QVariant() ) @@ -142,6 +144,7 @@ struct InfoRequestData { InfoRequestData( const quint64 rId, const QString &callr, const Tomahawk::InfoSystem::InfoType typ, const QVariant &inputvar, const QVariantMap &custom ) : requestId( rId ) + , internalId( TomahawkUtils::infosystemRequestId() ) , caller( callr ) , type( typ ) , input( inputvar ) diff --git a/src/libtomahawk/infosystem/infosystemworker.cpp b/src/libtomahawk/infosystem/infosystemworker.cpp index b89fee015..95cf8e63b 100644 --- a/src/libtomahawk/infosystem/infosystemworker.cpp +++ b/src/libtomahawk/infosystem/infosystemworker.cpp @@ -173,7 +173,7 @@ InfoSystemWorker::determineOrderedMatches( const InfoType type ) const void InfoSystemWorker::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData, uint timeoutMillis, bool allSources ) { -// qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO << "type is " << requestData.type << " and allSources = " << (allSources ? "true" : "false" ); QList< InfoPluginPtr > providers = determineOrderedMatches( requestData.type ); if ( providers.isEmpty() ) @@ -193,7 +193,13 @@ InfoSystemWorker::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData, ui continue; foundOne = true; - quint64 requestId = requestData.requestId; + + if ( allSources ) + requestData.internalId = TomahawkUtils::infosystemRequestId(); + else + requestData.internalId = requestData.requestId; + + quint64 requestId = requestData.internalId; m_requestSatisfiedMap[ requestId ] = false; if ( timeoutMillis != 0 ) { @@ -240,7 +246,7 @@ InfoSystemWorker::infoSlot( Tomahawk::InfoSystem::InfoRequestData requestData, Q { // qDebug() << Q_FUNC_INFO << "with requestId" << requestId; - quint64 requestId = requestData.requestId; + quint64 requestId = requestData.internalId; if ( m_dataTracker[ requestData.caller ][ requestData.type ] == 0 ) {