Changeset View
Changeset View
Standalone View
Standalone View
lib/sourcesmodel.cpp
Show First 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | 216 | { | |||
---|---|---|---|---|---|
232 | // where there are no results, we wait for a predefined time before | 232 | // where there are no results, we wait for a predefined time before | ||
233 | // clearing the model | 233 | // clearing the model | ||
234 | m_resetTimer.start(); | 234 | m_resetTimer.start(); | ||
235 | } | 235 | } | ||
236 | 236 | | |||
237 | void SourcesModel::slotResetTimeout() | 237 | void SourcesModel::slotResetTimeout() | ||
238 | { | 238 | { | ||
239 | if (!m_modelPopulated) { | 239 | if (!m_modelPopulated) { | ||
240 | clear(); | 240 | // The old items are still shown, get rid of them | ||
241 | beginResetModel(); | ||||
242 | m_matches.clear(); | ||||
243 | m_size = 0; | ||||
244 | m_duplicates.clear(); | ||||
245 | endResetModel(); | ||||
241 | } | 246 | } | ||
242 | } | 247 | } | ||
243 | 248 | | |||
244 | void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l) | 249 | void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l) | ||
245 | { | 250 | { | ||
246 | beginResetModel(); | 251 | beginResetModel(); | ||
247 | m_matches.clear(); | 252 | m_matches.clear(); | ||
248 | m_size = 0; | 253 | m_size = 0; | ||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |