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 | |
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')
-rw-r--r-- | src/imports/particles/plugins.qmltypes | 8 | ||||
-rw-r--r-- | src/imports/qtquick2/plugins.qmltypes | 14 | ||||
-rw-r--r-- | src/imports/testlib/main.cpp | 10 | ||||
-rw-r--r-- | src/imports/testlib/plugins.qmltypes | 6 | ||||
-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 |
7 files changed, 24 insertions, 24 deletions
diff --git a/src/imports/particles/plugins.qmltypes b/src/imports/particles/plugins.qmltypes index 069b561b50..f8acb168b8 100644 --- a/src/imports/particles/plugins.qmltypes +++ b/src/imports/particles/plugins.qmltypes @@ -158,7 +158,7 @@ Module { Property { name: "acceleration"; type: "QQuickDirection"; isPointer: true } Signal { name: "affectParticles" - Parameter { name: "particles"; type: "QQmlV8Handle" } + Parameter { name: "particles"; type: "QQmlV4Handle" } Parameter { name: "dt"; type: "double" } } Signal { @@ -647,7 +647,7 @@ Module { Property { name: "velocityFromMovement"; type: "double" } Signal { name: "emitParticles" - Parameter { name: "particles"; type: "QQmlV8Handle" } + Parameter { name: "particles"; type: "QQmlV4Handle" } } Signal { name: "particlesPerSecondChanged" @@ -1052,8 +1052,8 @@ Module { Property { name: "emitWidth"; type: "double" } Signal { name: "emitFollowParticles" - Parameter { name: "particles"; type: "QQmlV8Handle" } - Parameter { name: "followed"; type: "QQmlV8Handle" } + Parameter { name: "particles"; type: "QQmlV4Handle" } + Parameter { name: "followed"; type: "QQmlV4Handle" } } Signal { name: "particlesPerParticlePerSecondChanged" diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index e5381629cc..aa24e39f85 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -777,7 +777,7 @@ Module { } Property { name: "available"; type: "bool"; isReadonly: true } Property { name: "contextType"; type: "string" } - Property { name: "context"; type: "QQmlV8Handle"; isReadonly: true } + Property { name: "context"; type: "QQmlV4Handle"; isReadonly: true } Property { name: "canvasSize"; type: "QSizeF" } Property { name: "tileSize"; type: "QSize" } Property { name: "canvasWindow"; type: "QRectF" } @@ -1818,13 +1818,13 @@ Module { } Method { name: "get" - type: "QQmlV8Handle" + type: "QQmlV4Handle" Parameter { name: "index"; type: "int" } } Method { name: "set" Parameter { name: "index"; type: "int" } - Parameter { type: "QQmlV8Handle" } + Parameter { type: "QQmlV4Handle" } } Method { name: "setProperty" @@ -3568,8 +3568,8 @@ Module { Signal { name: "defaultIncludeChanged" } Signal { name: "changed" - Parameter { name: "removed"; type: "QQmlV8Handle" } - Parameter { name: "inserted"; type: "QQmlV8Handle" } + Parameter { name: "removed"; type: "QQmlV4Handle" } + Parameter { name: "inserted"; type: "QQmlV4Handle" } } Method { name: "insert" @@ -3605,7 +3605,7 @@ Module { } Method { name: "get" - type: "QQmlV8Handle" + type: "QQmlV4Handle" Parameter { name: "index"; type: "int" } } } @@ -3690,7 +3690,7 @@ Module { Property { name: "source"; type: "QUrl" } Signal { name: "message" - Parameter { name: "messageObject"; type: "QQmlV8Handle" } + Parameter { name: "messageObject"; type: "QQmlV4Handle" } } Method { name: "sendMessage" diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 2ddb9deddc..c0ce046fd8 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -82,7 +82,7 @@ Q_SIGNALS: public Q_SLOTS: - QQmlV8Handle typeName(const QVariant& v) const + QQmlV4Handle typeName(const QVariant& v) const { QString name(v.typeName()); if (v.canConvert<QObject*>()) { @@ -97,22 +97,22 @@ public Q_SLOTS: } } - return QQmlV8Handle::fromHandle(v8::String::New(name.toUtf8())); + return QQmlV4Handle::fromV8Handle(v8::String::New(name.toUtf8())); } bool compare(const QVariant& act, const QVariant& exp) const { return act == exp; } - QQmlV8Handle callerFile(int frameIndex = 0) const + QQmlV4Handle callerFile(int frameIndex = 0) const { v8::Local<v8::StackTrace> stacks = v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed); int count = stacks->GetFrameCount(); if (count >= frameIndex + 1) { v8::Local<v8::StackFrame> frame = stacks->GetFrame(frameIndex + 1); - return QQmlV8Handle::fromHandle(frame->GetScriptNameOrSourceURL()); + return QQmlV4Handle::fromV8Handle(frame->GetScriptNameOrSourceURL()); } - return QQmlV8Handle(); + return QQmlV4Handle(); } int callerLine(int frameIndex = 0) const { diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes index 5d7c161926..5ad3f891f9 100644 --- a/src/imports/testlib/plugins.qmltypes +++ b/src/imports/testlib/plugins.qmltypes @@ -235,7 +235,7 @@ Module { Property { name: "dragThreshold"; type: "int"; isReadonly: true } Method { name: "typeName" - type: "QQmlV8Handle" + type: "QQmlV4Handle" Parameter { name: "v"; type: "QVariant" } } Method { @@ -246,10 +246,10 @@ Module { } Method { name: "callerFile" - type: "QQmlV8Handle" + type: "QQmlV4Handle" Parameter { name: "frameIndex"; type: "int" } } - Method { name: "callerFile"; type: "QQmlV8Handle" } + Method { name: "callerFile"; type: "QQmlV4Handle" } Method { name: "callerLine" type: "int" 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; |