Changeset View
Changeset View
Standalone View
Standalone View
src/statsyncing/jobs/MatchTracksJob.h
Show All 32 Lines | 28 | { | |||
---|---|---|---|---|---|
33 | */ | 33 | */ | ||
34 | class MatchTracksJob :public QObject, public ThreadWeaver::Job | 34 | class MatchTracksJob :public QObject, public ThreadWeaver::Job | ||
35 | { | 35 | { | ||
36 | Q_OBJECT | 36 | Q_OBJECT | ||
37 | 37 | | |||
38 | public: | 38 | public: | ||
39 | explicit MatchTracksJob( const ProviderPtrList &providers, QObject *parent = 0 ); | 39 | explicit MatchTracksJob( const ProviderPtrList &providers, QObject *parent = 0 ); | ||
40 | 40 | | |||
41 | virtual bool success() const; | 41 | virtual bool success() const override; | ||
42 | 42 | | |||
43 | /** | 43 | /** | ||
44 | * Binary OR of MetaValues.h Meta::val* flags that are used to compare tracks | 44 | * Binary OR of MetaValues.h Meta::val* flags that are used to compare tracks | ||
45 | * from different providers. Guaranteed to contain at least artist, album, | 45 | * from different providers. Guaranteed to contain at least artist, album, | ||
46 | * title. Valid only after run() has been called. | 46 | * title. Valid only after run() has been called. | ||
47 | */ | 47 | */ | ||
48 | static qint64 comparisonFields(); | 48 | static qint64 comparisonFields(); | ||
49 | 49 | | |||
Show All 35 Lines | 67 | Q_SIGNALS: | |||
85 | void started(ThreadWeaver::JobPointer); | 85 | void started(ThreadWeaver::JobPointer); | ||
86 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | 86 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | ||
87 | void done(ThreadWeaver::JobPointer); | 87 | void done(ThreadWeaver::JobPointer); | ||
88 | /** This job has failed. | 88 | /** This job has failed. | ||
89 | * This signal is emitted when success() returns false after the job is executed. */ | 89 | * This signal is emitted when success() returns false after the job is executed. */ | ||
90 | void failed(ThreadWeaver::JobPointer); | 90 | void failed(ThreadWeaver::JobPointer); | ||
91 | 91 | | |||
92 | protected: | 92 | protected: | ||
93 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 93 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
94 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 94 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
95 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) Q_DECL_OVERRIDE; | 95 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) override; | ||
96 | 96 | | |||
97 | private: | 97 | private: | ||
98 | /** | 98 | /** | ||
99 | * Queries each provider from @param artistProviders for tracks from artist | 99 | * Queries each provider from @param artistProviders for tracks from artist | ||
100 | * they specify and separates them into m_uniqueTracks, m_excludedTracks and | 100 | * they specify and separates them into m_uniqueTracks, m_excludedTracks and | ||
101 | * m_matchedTuples. | 101 | * m_matchedTuples. | ||
102 | */ | 102 | */ | ||
103 | void matchTracksFromArtist( const QMultiMap<ProviderPtr, QString> &artistProviders ); | 103 | void matchTracksFromArtist( const QMultiMap<ProviderPtr, QString> &artistProviders ); | ||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |