From d3336372b7b1fcdbea8f77fd1694cbbf645d7ec7 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 Sep 2015 10:11:23 +0200 Subject: [PATCH] editorEvent Fix - I accidently changed the QAbstractItemModel of the argmument of the function into a QStandardItemModel. --- Polyhedron/demo/Polyhedron/Scene.cpp | 3 +-- Polyhedron/demo/Polyhedron/Scene.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index 67ac68beed2..4690acb2be0 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -665,11 +665,10 @@ void Scene::itemChanged(Scene_item* /* item */) this->createIndex(m_entries.size() - 1, LastColumn)); } -bool SceneDelegate::editorEvent(QEvent *event, QStandardItemModel *model, +bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) { - qDebug()<<"editor event"; QAbstractProxyModel* proxyModel = dynamic_cast(model); Q_ASSERT(proxyModel); Scene *scene = dynamic_cast(proxyModel->sourceModel()); diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index 1ed3532ec70..9f5f4a8c38e 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -168,6 +168,7 @@ private Q_SLOTS: for(int i=0; i<5; i++) { list<setEditable(false); } for(int i=0; i