summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxgridview.cpp7
-rw-r--r--src/declarative/fx/qfxlistview.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 25c1565..b2fb1a1 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -79,8 +79,11 @@ public:
}
static QFxGridViewAttached *properties(QObject *obj) {
- QFxGridViewAttached *rv = new QFxGridViewAttached(obj);
- attachedProperties.insert(obj, rv);
+ QFxGridViewAttached *rv = attachedProperties.value(obj);
+ if(!rv) {
+ rv = new QFxGridViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
return rv;
}
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index c85d8ce..76f7e11 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -98,8 +98,11 @@ public:
}
static QFxListViewAttached *properties(QObject *obj) {
- QFxListViewAttached *rv = new QFxListViewAttached(obj);
- attachedProperties.insert(obj, rv);
+ QFxListViewAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QFxListViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
return rv;
}