aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/util
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-03 23:01:00 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-06-05 12:37:44 +0200
commitcddc70614b625ec4308e1703f959b1220085e6de (patch)
tree33d676a7d53ea1ffec10b724faf3add45611b0e0 /src/qml/util
parent6178d3437dad86ec9e7da2170944c40b2b352db0 (diff)
Port the first half of the delegate model code to v4
Change-Id: Ieda3de0a297ba15e4d6634a1123df27347830cfa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/util')
-rw-r--r--src/qml/util/qqmladaptormodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp
index cb0111954d..5fa6d31ee7 100644
--- a/src/qml/util/qqmladaptormodel.cpp
+++ b/src/qml/util/qqmladaptormodel.cpp
@@ -423,7 +423,7 @@ public:
type->model->aim()->index(index, 0, type->model->rootIndex), value, role);
}
- v8::Handle<v8::Value> get()
+ QV4::Value get()
{
if (!type->constructor) {
QQmlAdaptorModelEngineData * const data = engineData(engine);
@@ -433,7 +433,7 @@ public:
v8::Handle<v8::Object> data = type->constructor->NewInstance();
data->SetExternalResource(this);
++scriptRef;
- return data;
+ return data->v4Value();
}
static v8::Handle<v8::Value> get_hasModelChildren(v8::Handle<v8::String>, const v8::AccessorInfo &info)
@@ -610,12 +610,12 @@ public:
data->engine->toVariant(value->v4Value(), QVariant::Invalid));
}
- v8::Handle<v8::Value> get()
+ QV4::Value get()
{
v8::Handle<v8::Object> data = engineData(engine)->constructorListItem.value().asFunctionObject()->newInstance();
data->SetExternalResource(this);
++scriptRef;
- return data;
+ return data->v4Value();
}
void setValue(const QString &role, const QVariant &value)