From 6e9713c558ad07b0baa2a79ae69328fda7b61a15 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 13 May 2012 23:29:28 +0200 Subject: PlacesItemModel: Remove setItemHidden and isItemHidden This should be handled automatically when the hidden-state of the item itself gets toggled. --- src/panels/places/placespanel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/panels/places/placespanel.cpp') diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 0ddb05bf7..bc639c0fb 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -131,7 +131,7 @@ void PlacesPanel::slotItemMiddleClicked(int index) void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos) { - const PlacesItem* item = m_model->placesItem(index); + PlacesItem* item = m_model->placesItem(index); if (!item) { return; } @@ -219,7 +219,7 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos) m_model->removeItem(index); m_model->save(); } else if (action == hideAction) { - m_model->setItemHidden(index, hideAction->isChecked()); + item->setHidden(hideAction->isChecked()); m_model->save(); } else if (action == openInNewTabAction) { const KUrl url = m_model->item(index)->dataValue("url").value(); @@ -359,7 +359,7 @@ void PlacesPanel::editEntry(int index) // that another group should be assigned, we still apply the old // group to keep the same position for the item. item->setGroup(oldItem->group()); - m_model->replaceItem(index, item); + m_model->changeItem(index, item); } } -- cgit v1.3