Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexscheduler.cpp
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | 195 | { | |||
---|---|---|---|---|---|
201 | } else if (m_indexerStates.contains(Suspended)) { | 201 | } else if (m_indexerStates.contains(Suspended)) { | ||
202 | qDebug() << "Resuming content indexing"; | 202 | qDebug() << "Resuming content indexing"; | ||
203 | 203 | | |||
204 | m_indexerStates.removeOne(Suspended); | 204 | m_indexerStates.removeOne(Suspended); | ||
205 | scheduleIndexing(); | 205 | scheduleIndexing(); | ||
206 | } | 206 | } | ||
207 | } | 207 | } | ||
208 | 208 | | |||
209 | void FileIndexScheduler::halt() | ||||
210 | { | ||||
211 | m_indexerStates = QList<Baloo::IndexerState>() << Idle; | ||||
212 | m_contentIndexer->quit(); | ||||
213 | m_threadPool.clear(); | ||||
214 | m_threadPool.waitForDone(); | ||||
215 | } | ||||
216 | | ||||
209 | uint FileIndexScheduler::getRemainingTime() | 217 | uint FileIndexScheduler::getRemainingTime() | ||
210 | { | 218 | { | ||
211 | if (m_indexerStates.at(0) != ContentIndexing) { | 219 | if (m_indexerStates.at(0) != ContentIndexing) { | ||
212 | return 0; | 220 | return 0; | ||
213 | } | 221 | } | ||
214 | return m_timeEstimator.calculateTimeLeft(m_provider.size()); | 222 | return m_timeEstimator.calculateTimeLeft(m_provider.size()); | ||
215 | } | 223 | } | ||
216 | 224 | | |||
Show All 27 Lines |