From 248ce7c57a86f964c82c8e0b48e9c07d52c3934e Mon Sep 17 00:00:00 2001 From: Simon Paul St James Date: Sun, 25 Jan 2009 19:46:08 +0000 Subject: Refactor the folder expansion system. Main effect: instead of having a list of m_expandedViews which cannot yet be deleted, we more accurately identify the current source of the drag operation if any and store only this for later deletion. This also fixes folder-expansion not working in Column view. svn path=/trunk/KDE/kdebase/apps/; revision=916701 --- src/dolphinview.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index 9dd001c8e..ea77024a6 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -628,10 +628,11 @@ private slots: void restoreCurrentItem(); /** - * Is connected to the enterDir() signal from the FolderExpander - * and triggers the entering of the directory indicated by \a index. + * If \a view can be positively identified as not being the source for the + * current drag operation, deleteLater() it immediately. Else stores + * it for later deletion. */ - void enterDir(const QModelIndex& index, QAbstractItemView* view); + void deleteWhenNotDragSource(QAbstractItemView* view); private: void loadDirectory(const KUrl& url, bool reload = false); @@ -699,12 +700,6 @@ private: */ bool isColumnViewActive() const; - /** - * Deletes all views from m_expandedViews except if the view - * is currently shown. - */ - void deleteExpandedViews(); - /** * Returns the MIME data for all selected items. */ @@ -741,7 +736,7 @@ private: KUrl m_rootUrl; KUrl m_currentItemUrl; - QList m_expandedViews; + QAbstractItemView* m_expandedDragSource; }; inline bool DolphinView::isColumnViewActive() const -- cgit v1.3