diff options
| author | Vishesh Handa <[email protected]> | 2013-05-06 18:41:21 +0530 |
|---|---|---|
| committer | Vishesh Handa <[email protected]> | 2013-05-07 01:36:37 +0530 |
| commit | 38bb5f1547e2a18d40a01fabf9b4478f5fe66130 (patch) | |
| tree | 9a3b4f69e52949376d9e90090cc5a902854aba06 /src/kitemviews/kstandarditemmodel.cpp | |
| parent | ff3b009e68f485a1a65a7535b01eeeb7128463d2 (diff) | |
Dolphin Places: React to Nepomuk system changes
Reload the places panel when Nepomuk starts up and shutsdown. This way
the user does not need to restart Dolphin to see the custom searches and
places after Nepomuk switches on.
BUG: 304918
REVIEW: 110323
Diffstat (limited to 'src/kitemviews/kstandarditemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kstandarditemmodel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kitemviews/kstandarditemmodel.cpp b/src/kitemviews/kstandarditemmodel.cpp index dbf608c92..959d62cb8 100644 --- a/src/kitemviews/kstandarditemmodel.cpp +++ b/src/kitemviews/kstandarditemmodel.cpp @@ -122,6 +122,15 @@ void KStandardItemModel::removeItem(int index) } } +void KStandardItemModel::clear() +{ + int size = m_items.size(); + m_items.clear(); + m_indexesForItems.clear(); + + emit itemsRemoved(KItemRangeList() << KItemRange(0, size)); +} + KStandardItem* KStandardItemModel::item(int index) const { if (index < 0 || index >= m_items.count()) { |
