Changeset View
Changeset View
Standalone View
Standalone View
src/playlistgenerator/ConstraintSolver.cpp
Show All 19 Lines | |||||
20 | #include "ConstraintSolver.h" | 20 | #include "ConstraintSolver.h" | ||
21 | 21 | | |||
22 | #include "Constraint.h" | 22 | #include "Constraint.h" | ||
23 | 23 | | |||
24 | #include "core/collections/QueryMaker.h" | 24 | #include "core/collections/QueryMaker.h" | ||
25 | #include "core/meta/Meta.h" | 25 | #include "core/meta/Meta.h" | ||
26 | #include "core/support/Debug.h" | 26 | #include "core/support/Debug.h" | ||
27 | #include "core/support/Components.h" | 27 | #include "core/support/Components.h" | ||
28 | #include "core/interfaces/Logger.h" | 28 | #include "core/logger/Logger.h" | ||
29 | #include "core-impl/collections/support/CollectionManager.h" | 29 | #include "core-impl/collections/support/CollectionManager.h" | ||
30 | #include "playlist/PlaylistModel.h" | 30 | #include "playlist/PlaylistModel.h" | ||
31 | 31 | | |||
32 | #include <KLocalizedString> | 32 | #include <KLocalizedString> | ||
33 | #include <KRandom> | 33 | #include <KRandom> | ||
34 | 34 | | |||
35 | #include <QHash> | 35 | #include <QHash> | ||
36 | #include <QMutexLocker> | 36 | #include <QMutexLocker> | ||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | |||||
222 | void | 222 | void | ||
223 | APG::ConstraintSolver::receiveQueryMakerDone() | 223 | APG::ConstraintSolver::receiveQueryMakerDone() | ||
224 | { | 224 | { | ||
225 | m_qm->deleteLater(); | 225 | m_qm->deleteLater(); | ||
226 | m_qm = 0; | 226 | m_qm = 0; | ||
227 | 227 | | |||
228 | if (( m_domain.size() > 0 ) || m_domainReductionFailed ) { | 228 | if (( m_domain.size() > 0 ) || m_domainReductionFailed ) { | ||
229 | if ( m_domain.size() <= 0 ) { | 229 | if ( m_domain.size() <= 0 ) { | ||
230 | Amarok::Components::logger()->shortMessage( i18n("The playlist generator failed to load any tracks from the collection.") ); | 230 | Amarok::Logger::shortMessage( i18n("The playlist generator failed to load any tracks from the collection.") ); | ||
231 | } | 231 | } | ||
232 | m_readyToRun = true; | 232 | m_readyToRun = true; | ||
233 | emit readyToRun(); | 233 | emit readyToRun(); | ||
234 | } else { | 234 | } else { | ||
235 | Amarok::Components::logger()->longMessage( | 235 | Amarok::Logger::longMessage( | ||
236 | i18n("There are no tracks that match all constraints. " \ | 236 | i18n("There are no tracks that match all constraints. " \ | ||
237 | "The playlist generator will find the tracks that match best, " \ | 237 | "The playlist generator will find the tracks that match best, " \ | ||
238 | "but you may want to consider loosening the constraints to find more tracks.") ); | 238 | "but you may want to consider loosening the constraints to find more tracks.") ); | ||
239 | m_domainReductionFailed = true; | 239 | m_domainReductionFailed = true; | ||
240 | 240 | | |||
241 | // need a new query maker without constraints | 241 | // need a new query maker without constraints | ||
242 | m_qm = CollectionManager::instance()->queryMaker(); | 242 | m_qm = CollectionManager::instance()->queryMaker(); | ||
243 | if ( m_qm ) { | 243 | if ( m_qm ) { | ||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |