mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-14 04:51:53 +02:00
Rename SavedRequestData and promote it
This commit is contained in:
parent
eb7f3fdab4
commit
51fba9ae62
@ -107,6 +107,13 @@ enum InfoType { // as items are saved in cache, mark them here to not change the
|
||||
InfoNotifyUser = 55
|
||||
};
|
||||
|
||||
struct InfoRequestData {
|
||||
QString caller;
|
||||
Tomahawk::InfoSystem::InfoType type;
|
||||
QVariant input;
|
||||
QVariantMap customData;
|
||||
};
|
||||
|
||||
typedef QMap< InfoType, QVariant > InfoTypeMap;
|
||||
typedef QMap< InfoType, uint > InfoTimeoutMap;
|
||||
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
|
||||
|
@ -184,7 +184,7 @@ InfoSystemWorker::getInfo( QString caller, InfoType type, QVariant input, QVaria
|
||||
m_dataTracker[ caller ][ type ] = m_dataTracker[ caller ][ type ] + 1;
|
||||
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[ caller ][ type ];
|
||||
|
||||
SavedRequestData* data = new SavedRequestData;
|
||||
InfoRequestData* data = new InfoRequestData;
|
||||
data->caller = caller;
|
||||
data->type = type;
|
||||
data->input = input;
|
||||
@ -271,7 +271,7 @@ InfoSystemWorker::checkTimeoutsTimerFired()
|
||||
|
||||
//doh, timed out
|
||||
qDebug() << Q_FUNC_INFO << " doh, timed out for requestId " << requestId;
|
||||
SavedRequestData *savedData = m_savedRequestMap[ requestId ];
|
||||
InfoRequestData *savedData = m_savedRequestMap[ requestId ];
|
||||
QString target = savedData->caller;
|
||||
InfoType type = savedData->type;
|
||||
emit info( target, type, savedData->input, QVariant(), savedData->customData );
|
||||
|
@ -37,13 +37,7 @@ namespace Tomahawk {
|
||||
|
||||
namespace InfoSystem {
|
||||
|
||||
struct SavedRequestData {
|
||||
QString caller;
|
||||
Tomahawk::InfoSystem::InfoType type;
|
||||
QVariant input;
|
||||
QVariantMap customData;
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT InfoSystemWorker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -80,7 +74,7 @@ private:
|
||||
QHash< QString, QHash< InfoType, int > > m_dataTracker;
|
||||
QMultiMap< qint64, uint > m_timeRequestMapper;
|
||||
QHash< uint, bool > m_requestSatisfiedMap;
|
||||
QHash< uint, SavedRequestData* > m_savedRequestMap;
|
||||
QHash< uint, InfoRequestData* > m_savedRequestMap;
|
||||
|
||||
QLinkedList< InfoPluginPtr > determineOrderedMatches( const InfoType type ) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user