Changeset View
Changeset View
Standalone View
Standalone View
src/dynamic/BiasedPlaylist.cpp
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #define DEBUG_PREFIX "BiasedPlaylist" | 20 | #define DEBUG_PREFIX "BiasedPlaylist" | ||
21 | 21 | | |||
22 | #include "BiasedPlaylist.h" | 22 | #include "BiasedPlaylist.h" | ||
23 | 23 | | |||
24 | #include "App.h" | 24 | #include "App.h" | ||
25 | #include "amarokconfig.h" | 25 | #include "amarokconfig.h" | ||
26 | #include "core/collections/Collection.h" | 26 | #include "core/collections/Collection.h" | ||
27 | #include "core/interfaces/Logger.h" | 27 | #include "core/logger/Logger.h" | ||
28 | #include "core/meta/Meta.h" | 28 | #include "core/meta/Meta.h" | ||
29 | #include "core/support/Components.h" | 29 | #include "core/support/Components.h" | ||
30 | #include "core/support/Debug.h" | 30 | #include "core/support/Debug.h" | ||
31 | #include "core-impl/collections/support/CollectionManager.h" | 31 | #include "core-impl/collections/support/CollectionManager.h" | ||
32 | #include "dynamic/BiasSolver.h" | 32 | #include "dynamic/BiasSolver.h" | ||
33 | #include "dynamic/BiasFactory.h" | 33 | #include "dynamic/BiasFactory.h" | ||
34 | #include "dynamic/DynamicModel.h" | 34 | #include "dynamic/DynamicModel.h" | ||
35 | #include "playlist/PlaylistModelStack.h" // for The::playlist | 35 | #include "playlist/PlaylistModelStack.h" // for The::playlist | ||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 113 | { | |||
115 | debug() << "BiasedPlaylist in:" << QThread::currentThreadId(); | 115 | debug() << "BiasedPlaylist in:" << QThread::currentThreadId(); | ||
116 | 116 | | |||
117 | if( !m_solver ) | 117 | if( !m_solver ) | ||
118 | { | 118 | { | ||
119 | debug() << "assigning new m_solver"; | 119 | debug() << "assigning new m_solver"; | ||
120 | m_solver = new BiasSolver( numRequested, m_bias, getContext() ); | 120 | m_solver = new BiasSolver( numRequested, m_bias, getContext() ); | ||
121 | connect( m_solver, &BiasSolver::done, this, &BiasedPlaylist::solverFinished ); | 121 | connect( m_solver, &BiasSolver::done, this, &BiasedPlaylist::solverFinished ); | ||
122 | 122 | | |||
123 | Amarok::Components::logger()->newProgressOperation( m_solver, | 123 | Amarok::Logger::newProgressOperation( m_solver, | ||
124 | i18n( "Generating playlist..." ), 100, | 124 | i18n( "Generating playlist..." ), 100, | ||
125 | this, &BiasedPlaylist::requestAbort ); | 125 | this, &BiasedPlaylist::requestAbort ); | ||
126 | 126 | | |||
127 | ThreadWeaver::Queue::instance()->enqueue( QSharedPointer<ThreadWeaver::Job>(m_solver) ); | 127 | ThreadWeaver::Queue::instance()->enqueue( QSharedPointer<ThreadWeaver::Job>(m_solver) ); | ||
128 | 128 | | |||
129 | debug() << "called prepareToRun"; | 129 | debug() << "called prepareToRun"; | ||
130 | } | 130 | } | ||
131 | else | 131 | else | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |