Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/kastatsfavoritesmodel.cpp
Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Line(s) | 314 | { | |||
---|---|---|---|---|---|
330 | 330 | | |||
331 | beginRemoveRows(QModelIndex(), index, index); | 331 | beginRemoveRows(QModelIndex(), index, index); | ||
332 | auto entry = m_itemEntries[resource]; | 332 | auto entry = m_itemEntries[resource]; | ||
333 | m_items.removeAt(index); | 333 | m_items.removeAt(index); | ||
334 | 334 | | |||
335 | // Removing the entry from the cache | 335 | // Removing the entry from the cache | ||
336 | QMutableHashIterator<QString, AbstractEntry*> i(m_itemEntries); | 336 | QMutableHashIterator<QString, AbstractEntry*> i(m_itemEntries); | ||
337 | while (i.hasNext()) { | 337 | while (i.hasNext()) { | ||
338 | i.next(); | ||||
338 | if (i.value() == entry) { | 339 | if (i.value() == entry) { | ||
339 | i.remove(); | 340 | i.remove(); | ||
340 | } | 341 | } | ||
341 | i.next(); | | |||
342 | } | 342 | } | ||
343 | delete entry; | 343 | delete entry; | ||
344 | 344 | | |||
345 | endRemoveRows(); | 345 | endRemoveRows(); | ||
346 | } | 346 | } | ||
347 | 347 | | |||
348 | 348 | | |||
349 | int rowCount(const QModelIndex &parent = QModelIndex()) const override | 349 | int rowCount(const QModelIndex &parent = QModelIndex()) const override | ||
▲ Show 20 Lines • Show All 371 Lines • Show Last 20 Lines |