From 3b4dfa2040c1e970ba6689bd7a874fab5f423e2d Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 15 Dec 2006 01:56:57 +0000 Subject: Update for using a proxy model: prevent accessing the model by model() and doing a cast do KDirModel afterwards. Instead the access to the KDirModel is done by a member variable. Still the proxy model does not seem to work and leads to a crash as soon as the QListView should work with the proxy model -> in the meantime in line 112 from DolphinView.cpp the KDirModel is used instead of the proxy model. svn path=/trunk/playground/utils/dolphin/; revision=613768 --- src/dolphiniconsview.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dolphiniconsview.cpp') diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 98d1a05b1..eb3dde47f 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -58,6 +58,10 @@ void DolphinIconsView::contextMenuEvent(QContextMenuEvent* event) const QModelIndex index = indexAt(event->pos()); if (index.isValid()) { + // TODO: assuming that model() returns an instance of the class + // KDirModel is dangerous, especially in combination with a proxy model. + // As the current test implementation of proxy model does not work, this + // will be cleaned up later. KDirModel* dirModel = static_cast(model()); item = dirModel->itemForIndex(index); } -- cgit v1.3