Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexscheduler.cpp
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | 180 | { | |||
---|---|---|---|---|---|
186 | } else if (m_indexerStates.contains(Suspended)) { | 186 | } else if (m_indexerStates.contains(Suspended)) { | ||
187 | qDebug() << "Resuming content indexing"; | 187 | qDebug() << "Resuming content indexing"; | ||
188 | 188 | | |||
189 | m_indexerStates.removeOne(Suspended); | 189 | m_indexerStates.removeOne(Suspended); | ||
190 | scheduleIndexing(); | 190 | scheduleIndexing(); | ||
191 | } | 191 | } | ||
192 | } | 192 | } | ||
193 | 193 | | |||
194 | void FileIndexScheduler::halt() | ||||
195 | { | ||||
196 | m_indexerStates = QList<Baloo::IndexerState>() << Idle; | ||||
197 | m_contentIndexer->quit(); | ||||
198 | m_threadPool.clear(); | ||||
199 | m_threadPool.waitForDone(); | ||||
200 | } | ||||
201 | | ||||
194 | uint FileIndexScheduler::getRemainingTime() | 202 | uint FileIndexScheduler::getRemainingTime() | ||
195 | { | 203 | { | ||
196 | if (m_indexerStates.at(0) != ContentIndexing) { | 204 | if (m_indexerStates.at(0) != ContentIndexing) { | ||
197 | return 0; | 205 | return 0; | ||
198 | } | 206 | } | ||
199 | return m_timeEstimator.calculateTimeLeft(m_provider.size()); | 207 | return m_timeEstimator.calculateTimeLeft(m_provider.size()); | ||
200 | } | 208 | } | ||
201 | 209 | | |||
Show All 10 Lines |