summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativepropertycache.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-07 17:02:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-07 17:02:23 (GMT)
commit3ad6f3b1f4d2252e2a004acc8156a1fd308265cf (patch)
tree47433a30c85aaa2d869525a12c613aee29ab3073 /src/declarative/qml/qdeclarativepropertycache.cpp
parent6ff95852da22ba8843a2913c92aa37af36236ca0 (diff)
parent695ddc4a13233c8e6f626fa205336f90f8c5a565 (diff)
downloadQt-3ad6f3b1f4d2252e2a004acc8156a1fd308265cf.zip
Qt-3ad6f3b1f4d2252e2a004acc8156a1fd308265cf.tar.gz
Qt-3ad6f3b1f4d2252e2a004acc8156a1fd308265cf.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (131 commits) Avoid many unnecessary allocations, so so that paint engines attached to pixmaps Doc Fix autotests Fix autotests (remove import Qt.widgets) Add missing qml file to qdeclarativemousearea Doc fix Clean up example code, add white background behind text Update mouse area qmlvisual test to follow change QTBUG-10162 Fix autotest bug in MouseArea Avoid emitting release when the mouse is ungrabbed Resize qmlruntime window to new dimensions when orientation changes Compile with opengl enabled. Avoid repeated create/destroy at top list boundary with sub-pixel movement. Call QDeclarativeItem::geometryChanged() base implementation qdoc fixes. Avoid warnings as delegates with bindings to parent are created and destroyed. qdoc fixes TextInput echoMode doc. Make sure to call base class implementation. More cleanup ...
Diffstat (limited to 'src/declarative/qml/qdeclarativepropertycache.cpp')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 888945b..f04a706 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -106,9 +106,25 @@ void QDeclarativePropertyCache::Data::load(const QMetaMethod &m)
}
+/*!
+Creates a new empty QDeclarativePropertyCache.
+*/
QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e)
: QDeclarativeCleanup(e), engine(e)
{
+ Q_ASSERT(engine);
+}
+
+/*!
+Creates a new QDeclarativePropertyCache of \a metaObject.
+*/
+QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e, const QMetaObject *metaObject)
+: QDeclarativeCleanup(e), engine(e)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(metaObject);
+
+ update(engine, metaObject);
}
QDeclarativePropertyCache::~QDeclarativePropertyCache()
@@ -135,7 +151,7 @@ void QDeclarativePropertyCache::clear()
}
QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObject *metaObject,
- const QString &property)
+ const QString &property)
{
Q_ASSERT(metaObject);
@@ -245,17 +261,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
}
}
-// ### Optimize - check engine for the parent meta object etc.
-QDeclarativePropertyCache *QDeclarativePropertyCache::create(QDeclarativeEngine *engine, const QMetaObject *metaObject)
-{
- Q_ASSERT(engine);
- Q_ASSERT(metaObject);
-
- QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine);
- cache->update(engine, metaObject);
- return cache;
-}
-
void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject)
{
Q_ASSERT(engine);