┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphintreeview.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2011-01-16 18:35:36 +0000
committerFrank Reininghaus <[email protected]>2011-01-16 18:35:36 +0000
commite5a0ce83fdd6ea02598df8dece4ce9c89bfd6240 (patch)
treefcb69f7b3923c85efb37292016801765261fd867 /src/views/dolphintreeview.h
parentae59d894c2691b02e3ce63707b590ff797d9e7b6 (diff)
DolphinTreeView contains some code to update the selection after a
keyboard search because QTreeView (unlike the other item views) does not handle this internally. This commit simplifies that code by performing the selection update in the method keyboardSearch(). That way, we can get rid of the member m_updateCurrentIndex and of 3 member functions. The unit tests still pass, so I'm quite confident that this does not break anything. svn path=/trunk/KDE/kdebase/apps/; revision=1214865
Diffstat (limited to 'src/views/dolphintreeview.h')
-rw-r--r--src/views/dolphintreeview.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/views/dolphintreeview.h b/src/views/dolphintreeview.h
index dbbc984a6..c037d412a 100644
--- a/src/views/dolphintreeview.h
+++ b/src/views/dolphintreeview.h
@@ -41,6 +41,7 @@ public:
virtual ~DolphinTreeView();
virtual QModelIndex indexAt (const QPoint& point) const;
+ virtual void keyboardSearch(const QString & search);
virtual QRegion visualRegionForSelection(const QItemSelection& selection) const;
protected:
@@ -60,9 +61,6 @@ protected:
virtual void dragMoveEvent(QDragMoveEvent* event);
virtual void dragLeaveEvent(QDragLeaveEvent* event);
virtual void paintEvent(QPaintEvent* event);
- virtual void keyPressEvent(QKeyEvent* event);
- virtual void keyReleaseEvent(QKeyEvent* event);
- virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command);
virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible);
@@ -95,7 +93,6 @@ private:
bool isAboveExpandingToggle(const QPoint& pos) const;
private:
- bool m_updateCurrentIndex;
bool m_expandingTogglePressed;
bool m_useDefaultIndexAt; // true, if QTreeView::indexAt() should be used
bool m_ignoreScrollTo; // true if calls to scrollTo(...) should do nothing.