diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-18 10:02:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | 8b3623ee7b707e1b26ad48bdbf7816b95d9e0e24 (patch) | |
tree | ca8c955546b9a70c60a4befc7eeccc944bc16d58 /src/qml/util | |
parent | 055f71f87d5d58be2aafd6c0ef2b84d57ed48b63 (diff) |
Start using StringRef for parameter passing
Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/util')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 1562ab1029..51d6b3c4da 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -215,8 +215,8 @@ public: QV4::ExecutionEngine *v4 = data->v4; QV4::Scope scope(v4); QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); - proto->defineAccessorProperty(v4->newString(QStringLiteral("index")), get_index, 0); - proto->defineAccessorProperty(v4->newString(QStringLiteral("hasModelChildren")), get_hasModelChildren, 0); + proto->defineAccessorProperty(v4, QStringLiteral("index"), get_index, 0); + proto->defineAccessorProperty(v4, QStringLiteral("hasModelChildren"), get_hasModelChildren, 0); typedef QHash<QByteArray, int>::const_iterator iterator; for (iterator it = roleNames.constBegin(), end = roleNames.constEnd(); it != end; ++it) { @@ -953,8 +953,8 @@ QQmlAdaptorModelEngineData::QQmlAdaptorModelEngineData(QV8Engine *e) { QV4::Scope scope(v4); QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); - proto->defineAccessorProperty(v4->newString(QStringLiteral("index")), get_index, 0); - proto->defineAccessorProperty(v4->newString(QStringLiteral("modelData")), + proto->defineAccessorProperty(v4, QStringLiteral("index"), get_index, 0); + proto->defineAccessorProperty(v4, QStringLiteral("modelData"), QQmlDMListAccessorData::get_modelData, QQmlDMListAccessorData::set_modelData); listItemProto = proto; } |