diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-19 10:59:41 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-19 13:07:10 +0200 |
commit | 3e08aa42497f7d264be039f31f4eedf639eda307 (patch) | |
tree | 871ee4f38715ab0111fe8e2c49756ca60390898e /src/imports/xmllistmodel | |
parent | 190b376859ae9709e887886fcbaa56d60495be66 (diff) |
Rename QQmlV8Handle to QQmlV4Handle
The handle wraps a V4 Value, so this is the better name for it.
Also added some accessor methods to convert to and from V4
Values.
Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports/xmllistmodel')
-rw-r--r-- | src/imports/xmllistmodel/plugins.qmltypes | 2 | ||||
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 6 | ||||
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel_p.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/xmllistmodel/plugins.qmltypes b/src/imports/xmllistmodel/plugins.qmltypes index 281a2adf05..c71899776f 100644 --- a/src/imports/xmllistmodel/plugins.qmltypes +++ b/src/imports/xmllistmodel/plugins.qmltypes @@ -39,7 +39,7 @@ Module { Method { name: "reload" } Method { name: "get" - type: "QQmlV8Handle" + type: "QQmlV4Handle" Parameter { name: "index"; type: "int" } } Method { name: "errorString"; type: "string" } diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index cc2b8d1548..fc918decdd 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -908,13 +908,13 @@ void QQuickXmlListModel::setNamespaceDeclarations(const QString &declarations) var title = model.get(0).title; \endjs */ -QQmlV8Handle QQuickXmlListModel::get(int index) const +QQmlV4Handle QQuickXmlListModel::get(int index) const { // Must be called with a context and handle scope Q_D(const QQuickXmlListModel); if (index < 0 || index >= count()) - return QQmlV8Handle::fromHandle(v8::Undefined()); + return QQmlV4Handle::fromV8Handle(v8::Undefined()); QQmlEngine *engine = qmlContext(this)->engine(); QV8Engine *v8engine = QQmlEnginePrivate::getV8Engine(engine); @@ -923,7 +923,7 @@ QQmlV8Handle QQuickXmlListModel::get(int index) const rv->Set(v8engine->toString(d->roleObjects[ii]->name()), v8engine->fromVariant(d->data.value(ii).value(index))); - return QQmlV8Handle::fromHandle(rv); + return QQmlV4Handle::fromV8Handle(rv); } /*! diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h index 0a11cc6e28..ca4b7cf811 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h +++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h @@ -107,7 +107,7 @@ public: QString namespaceDeclarations() const; void setNamespaceDeclarations(const QString&); - Q_INVOKABLE QQmlV8Handle get(int index) const; + Q_INVOKABLE QQmlV4Handle get(int index) const; enum Status { Null, Ready, Loading, Error }; Status status() const; |