From 768658b51ebabff535263efb0870b436beb00fcc Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 27 Apr 2009 17:44:25 +1000 Subject: Don't crash when not using QFxVisualItemModel with PathView PathView was creating its own internal QFxVisualItemModel but not correctly setting the context. --- src/declarative/fx/qfxpathview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index b1cfaa5..1bf7dda 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -188,7 +188,7 @@ void QFxPathView::setModel(const QVariant &model) d->model = m; } else { if (!d->ownModel) { - d->model = new QFxVisualItemModel; + d->model = new QFxVisualItemModel(qmlContext(this)); d->ownModel = true; } d->model->setModel(model); @@ -368,7 +368,7 @@ void QFxPathView::setDelegate(QmlComponent *c) { Q_D(QFxPathView); if (!d->ownModel) { - d->model = new QFxVisualItemModel; + d->model = new QFxVisualItemModel(qmlContext(this)); d->ownModel = true; } d->model->setDelegate(c); -- cgit v0.12