aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-11-16 14:29:32 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2016-11-16 14:36:49 +0000
commitfccbc89125852f9d8679f7ae8d201a67619f6066 (patch)
treeeb81af5e58884219dca0f7a22dfdc1a6f6186092 /src/qml/qml/qqmlpropertycache.cpp
parentb7a8b5a284bdf306a45b11e1c5ce308be007d1de (diff)
QML: Add another specialization for QQmlPropertyCache::property
QQmlListReference passes a QLatin1String in, which can behandled by the stringCache just fine. So if there is a cache entry, then this will skip toQString conversion. Change-Id: I13afe4f6e63d486b313ac58cbd86fb7f9e1a80f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 2610a807b5..a110dccee2 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -1096,6 +1096,13 @@ QQmlPropertyCache::property(QJSEngine *engine, QObject *obj,
return qQmlPropertyCacheProperty<const QString &>(engine, obj, name, context, local);
}
+QQmlPropertyData *
+QQmlPropertyCache::property(QJSEngine *engine, QObject *obj, const QLatin1String &name,
+ QQmlContextData *context, QQmlPropertyData &local)
+{
+ return qQmlPropertyCacheProperty<const QLatin1String &>(engine, obj, name, context, local);
+}
+
// these two functions are copied from qmetaobject.cpp
static inline const QMetaObjectPrivate *priv(const uint* data)
{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }