summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2015-01-16 12:35:56 +0900
committerMichele Calgaro <[email protected]>2015-01-16 12:45:17 +0900
commitb78e6190535123d4e10bedbe29daf10565c0c084 (patch)
tree897e0295c92f33e2debe0474edcbe178fd94a776
parentcb57172c20211a968dbe6f1a841cf221486aef84 (diff)
downloadtdebase-b78e6190535123d4e10bedbe29daf10565c0c084.tar.gz
tdebase-b78e6190535123d4e10bedbe29daf10565c0c084.zip
Added required refreshItems logic. This relates to bug 146.
cherry picked from commit bf0861baf08e739ab3721d642178dbab64015675) Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--konqueror/iconview/konq_iconview.cc1
-rw-r--r--konqueror/listview/konq_listviewwidget.cc1
-rw-r--r--libkonq/konq_dirpart.cc13
-rw-r--r--libkonq/konq_dirpart.h15
4 files changed, 24 insertions, 6 deletions
diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc
index 3b6432d1e..d90fe5290 100644
--- a/konqueror/iconview/konq_iconview.cc
+++ b/konqueror/iconview/konq_iconview.cc
@@ -1228,6 +1228,7 @@ void KonqKfmIconView::slotRefreshItems( const KFileItemList& entries )
m_pIconView->updateContents();
}
}
+ KonqDirPart::refreshItems(entries); // Pass refresh command to KonqDirPart too
}
void KonqKfmIconView::slotClear()
diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc
index 0f245a5c5..ad7ada2c4 100644
--- a/konqueror/listview/konq_listviewwidget.cc
+++ b/konqueror/listview/konq_listviewwidget.cc
@@ -1376,6 +1376,7 @@ void KonqBaseListViewWidget::slotRefreshItems( const KFileItemList & entries )
}
}
+ m_pBrowserView->refreshItems(entries); // Pass refresh command to KonqDirPart too
reportItemCounts();
}
diff --git a/libkonq/konq_dirpart.cc b/libkonq/konq_dirpart.cc
index 602496b7c..030cc90a9 100644
--- a/libkonq/konq_dirpart.cc
+++ b/libkonq/konq_dirpart.cc
@@ -440,20 +440,25 @@ void KonqDirPart::updatePasteAction() // KDE4: merge into method above
emit m_extension->enableAction( "paste", paste );
}
-void KonqDirPart::newItems( const KFileItemList & entries )
+void KonqDirPart::newItems(const KFileItemList &entries)
{
d->dirSizeDirty = true;
if ( m_findPart ) {
emitTotalCount();
}
- emit itemsAdded( entries );
+ emit itemsAdded(entries);
}
-void KonqDirPart::deleteItem( KFileItem * fileItem )
+void KonqDirPart::deleteItem(KFileItem * fileItem)
{
d->dirSizeDirty = true;
- emit itemRemoved( fileItem );
+ emit itemRemoved(fileItem);
+}
+
+void KonqDirPart::refreshItems(const KFileItemList &entries)
+{
+ emit itemsRefresh(entries);
}
void KonqDirPart::emitTotalCount()
diff --git a/libkonq/konq_dirpart.h b/libkonq/konq_dirpart.h
index 6b24bf9c5..4a8d82cca 100644
--- a/libkonq/konq_dirpart.h
+++ b/libkonq/konq_dirpart.h
@@ -129,6 +129,11 @@ public:
void deleteItem( KFileItem * fileItem );
/**
+ * Refresh the items
+ */
+ void refreshItems(const KFileItemList &entries);
+
+ /**
* Show the counts for the directory in the status bar
*/
void emitTotalCount();
@@ -220,13 +225,19 @@ signals:
* Emitted as the part is updated with new items.
* Useful for informing plugins of changes in view.
*/
- void itemsAdded( const KFileItemList& );
+ void itemsAdded(const KFileItemList &);
/**
* Emitted as the part is updated with these items.
* Useful for informing plugins of changes in view.
*/
- void itemRemoved( const KFileItem* );
+ void itemRemoved(const KFileItem *);
+
+ /**
+ * Emitted when items need to be refreshed (for example when
+ * a file is renamed)
+ */
+ void itemsRefresh(const KFileItemList &);
/**
* Emitted with the list of filtered-out items whenever