Changeset View
Changeset View
Standalone View
Standalone View
src/AmarokMimeData.cpp
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | 147 | { | |||
---|---|---|---|---|---|
148 | d->tracks << tracks; | 148 | d->tracks << tracks; | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | void | 151 | void | ||
152 | AmarokMimeData::getTrackListSignal() const | 152 | AmarokMimeData::getTrackListSignal() const | ||
153 | { | 153 | { | ||
154 | if( d->completedQueries < d->queryMakers.count() ) | 154 | if( d->completedQueries < d->queryMakers.count() ) | ||
155 | { | 155 | { | ||
156 | QTimer::singleShot( 0, const_cast<AmarokMimeData*>( this ), SLOT(getTrackListSignal()) ); | 156 | QTimer::singleShot( 0, this, &AmarokMimeData::getTrackListSignal ); | ||
157 | return; | 157 | return; | ||
158 | } | 158 | } | ||
159 | else | 159 | else | ||
160 | { | 160 | { | ||
161 | Meta::TrackList result = d->tracks; | 161 | Meta::TrackList result = d->tracks; | ||
162 | foreach( Collections::QueryMaker *qm, d->queryMakers ) | 162 | foreach( Collections::QueryMaker *qm, d->queryMakers ) | ||
163 | { | 163 | { | ||
164 | if( d->trackMap.contains( qm ) ) | 164 | if( d->trackMap.contains( qm ) ) | ||
▲ Show 20 Lines • Show All 197 Lines • ▼ Show 20 Line(s) | |||||
362 | } | 362 | } | ||
363 | 363 | | |||
364 | void | 364 | void | ||
365 | AmarokMimeData::startQueries() | 365 | AmarokMimeData::startQueries() | ||
366 | { | 366 | { | ||
367 | foreach( Collections::QueryMaker *qm, d->queryMakers ) | 367 | foreach( Collections::QueryMaker *qm, d->queryMakers ) | ||
368 | { | 368 | { | ||
369 | qm->setQueryType( Collections::QueryMaker::Track ); | 369 | qm->setQueryType( Collections::QueryMaker::Track ); | ||
370 | connect( qm, SIGNAL(newResultReady(Meta::TrackList)), this, SLOT(newResultReady(Meta::TrackList)), Qt::QueuedConnection ); | 370 | connect( qm, &Collections::QueryMaker::newTracksReady, | ||
371 | connect( qm, SIGNAL(queryDone()), this, SLOT(queryDone()), Qt::QueuedConnection ); | 371 | this, &AmarokMimeData::newResultReady, Qt::QueuedConnection ); | ||
372 | connect( qm, &Collections::QueryMaker::queryDone, this, &AmarokMimeData::queryDone, Qt::QueuedConnection ); | ||||
372 | qm->run(); | 373 | qm->run(); | ||
373 | } | 374 | } | ||
374 | } | 375 | } | ||
375 | 376 | | |||
376 | void | 377 | void | ||
377 | AmarokMimeData::newResultReady( const Meta::TrackList &tracks ) | 378 | AmarokMimeData::newResultReady( const Meta::TrackList &tracks ) | ||
378 | { | 379 | { | ||
379 | Collections::QueryMaker *qm = dynamic_cast<Collections::QueryMaker*>( sender() ); | 380 | Collections::QueryMaker *qm = dynamic_cast<Collections::QueryMaker*>( sender() ); | ||
Show All 15 Lines |