diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-10-12 13:31:39 +0300 |
---|---|---|
committer | Anton Kudryavtsev <antkudr@mail.ru> | 2016-11-08 17:32:27 +0000 |
commit | 47af56343a12bad0d3696e139af9a23ee1f67933 (patch) | |
tree | 82e8a7e5c752a70cd32ee440d7131a150e218b47 /src/qml/qml/qqmlpropertycache_p.h | |
parent | 30cd2978eee14f75bbc85442fdbea4c9905fadbd (diff) |
QQmlPropertyCache: add property() overload with QStringRef arg
Now we can pass 'name' arg as QStringRef. Client code can
reduce allocations.
Change-Id: I444f7135f4912f54d57e0a1193f330a3976fc186
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache_p.h')
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 630d04938a..d34d1bf387 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -406,11 +406,17 @@ public: inline QQmlPropertyData *overrideData(QQmlPropertyData *) const; inline bool isAllowedInRevision(QQmlPropertyData *) const; - static QQmlPropertyData *property(QJSEngine *, QObject *, const QString &, + static QQmlPropertyData *property(QJSEngine *, QObject *, const QStringRef &, QQmlContextData *, QQmlPropertyData &); static QQmlPropertyData *property(QJSEngine *, QObject *, const QV4::String *, QQmlContextData *, QQmlPropertyData &); + static QQmlPropertyData *property(QJSEngine *engine, QObject *obj, const QString &name, + QQmlContextData *context, QQmlPropertyData &local) + { + return property(engine, obj, QStringRef(&name), context, local); + } + //see QMetaObjectPrivate::originalClone int originalClone(int index); static int originalClone(QObject *, int index); |