┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2006-12-15 01:56:57 +0000
committerPeter Penz <[email protected]>2006-12-15 01:56:57 +0000
commit3b4dfa2040c1e970ba6689bd7a874fab5f423e2d (patch)
treea7a39cfcf80aae6bf0fc2c8bc1083673eba19079 /src/dolphiniconsview.cpp
parent3bd97ea34c72164a2c583ec28eafcdfc887455cf (diff)
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
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp4
1 files changed, 4 insertions, 0 deletions
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<KDirModel*>(model());
item = dirModel->itemForIndex(index);
}