summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxgridview.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-04-28 01:32:24 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-04-28 01:32:24 (GMT)
commit4927fb460e12ee8b4dada1025ad042d2b6b9b6f4 (patch)
tree512d035357c8b56859c01ca7d211b86ec986787d /src/declarative/fx/qfxgridview.cpp
parenteae3489b3f2fba9d733ca50eb89dc92a6e96e6f8 (diff)
downloadQt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.zip
Qt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.tar.gz
Qt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.tar.bz2
Use QObject declarative data to store attached properties.
An element's qmlAttachedProperties() function will now only ever get called once per object.
Diffstat (limited to 'src/declarative/fx/qfxgridview.cpp')
-rw-r--r--src/declarative/fx/qfxgridview.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 5e4baac..25c1565 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -79,12 +79,9 @@ public:
}
static QFxGridViewAttached *properties(QObject *obj) {
- if(!attachedProperties.contains(obj)) {
- QFxGridViewAttached *rv = new QFxGridViewAttached(obj);
- attachedProperties.insert(obj, rv);
- return rv;
- }
- return attachedProperties.value(obj);
+ QFxGridViewAttached *rv = new QFxGridViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ return rv;
}
void emitAdd() { emit add(); }