summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-04-27 07:44:25 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-04-27 07:44:25 (GMT)
commit768658b51ebabff535263efb0870b436beb00fcc (patch)
tree20fdd05fcda2910d22a0df19696417e07c162908 /src
parent7e94543a9b013b6b1140137ba64406b74a363afc (diff)
downloadQt-768658b51ebabff535263efb0870b436beb00fcc.zip
Qt-768658b51ebabff535263efb0870b436beb00fcc.tar.gz
Qt-768658b51ebabff535263efb0870b436beb00fcc.tar.bz2
Don't crash when not using QFxVisualItemModel with PathView
PathView was creating its own internal QFxVisualItemModel but not correctly setting the context.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxpathview.cpp4
1 files 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);