Commit 9c09f3a1d9c616ec9f5bef8dbd3cbe40c85db1b5
- Diff rendering mode:
- inline
- side by side
src/dynamic/BiasSolver.cpp
(8 / 1)
|   | |||
| 828 | 828 | { | |
| 829 | 829 | DEBUG_BLOCK | |
| 830 | 830 | ||
| 831 | disconnect( CollectionManager::instance(), SIGNAL(collectionAdded(Amarok::Collection*,CollectionStatus)), this, SLOT(updateUniverse()) ); | ||
| 832 | |||
| 831 | 833 | /* TODO: Using multiple collections. | |
| 832 | 834 | * One problem with just using MetaQueryMaker is that we can't store uids as | |
| 833 | 835 | * QByteArrays unless we keep separate lists for each collection. If we do | |
| … | … | ||
| 850 | 850 | { | |
| 851 | 851 | if( !s_universeCollection ) | |
| 852 | 852 | s_universeCollection = CollectionManager::instance()->primaryCollection(); | |
| 853 | |||
| 853 | if( !s_universeCollection ) // WTF we really can't get a primarycollection? | ||
| 854 | { // whenever a collection is added lets check again, so we catch the loading of the primary colletion | ||
| 855 | connect( CollectionManager::instance(), SIGNAL(collectionAdded(Amarok::Collection*,CollectionStatus)), this, SLOT(updateUniverse()) ); | ||
| 856 | return; | ||
| 857 | } | ||
| 858 | |||
| 854 | 859 | s_universeQuery = s_universeCollection->queryMaker(); | |
| 855 | 860 | s_universeQuery->setQueryType( QueryMaker::Custom ); | |
| 856 | 861 | s_universeQuery->addReturnValue( Meta::valUniqueId ); |
src/dynamic/BiasSolver.h
(7 / 6)
|   | |||
| 132 | 132 | void universeResults( QString collectionId, QStringList ); | |
| 133 | 133 | void universeUpdated(); | |
| 134 | 134 | ||
| 135 | |||
| 136 | /** | ||
| 137 | * Query for the universe set (the set of all tracks in the | ||
| 138 | * collection being considered). | ||
| 139 | */ | ||
| 140 | void updateUniverse(); | ||
| 141 | |||
| 135 | 142 | private: | |
| 136 | 143 | /** | |
| 137 | 144 | * Try to produce an optimal playlist using a genetic algorithm, and | |
| … | … | ||
| 226 | 226 | * produce offspring. | |
| 227 | 227 | */ | |
| 228 | 228 | QList<int> generateMatingPopulation( const QList<TrackListEnergyPair>& ); | |
| 229 | |||
| 230 | /** | ||
| 231 | * Query for the universe set (the set of all tracks in the | ||
| 232 | * collection being considered). | ||
| 233 | */ | ||
| 234 | void updateUniverse(); | ||
| 235 | 229 | ||
| 236 | 230 | Meta::TrackList m_solution; | |
| 237 | 231 |

