summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-14 03:54:55 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-15 07:30:16 (GMT)
commit4f7e21dc04ce93531ef68f7694a5e8969448de8b (patch)
treece7e8170b5be6c974420d012a03f620f86cd6d8d /src/declarative/qml/qmlvmemetaobject.cpp
parent9eca9e028884fb82d97e284826faa7965af356bd (diff)
downloadQt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.zip
Qt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.tar.gz
Qt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.tar.bz2
Rework compiler to a two phase analyse/generate approach
Diffstat (limited to 'src/declarative/qml/qmlvmemetaobject.cpp')
-rw-r--r--src/declarative/qml/qmlvmemetaobject.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp
index 6d14689..33a31a4 100644
--- a/src/declarative/qml/qmlvmemetaobject.cpp
+++ b/src/declarative/qml/qmlvmemetaobject.cpp
@@ -53,12 +53,9 @@ QT_BEGIN_NAMESPACE
QmlVMEMetaObject::QmlVMEMetaObject(QObject *obj,
const QMetaObject *other,
- QList<QString> *strData,
- int slotData,
const QmlVMEMetaData *meta,
QmlRefCount *rc)
-: object(obj), ref(rc), metaData(meta), slotData(strData),
- slotDataIdx(slotData), parent(0)
+: object(obj), ref(rc), metaData(meta), parent(0)
{
if (ref)
ref->addref();
@@ -208,7 +205,11 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
id -= plainSignals;
if (id < metaData->methodCount) {
- QString code = slotData->at(id + slotDataIdx);
+ QmlVMEMetaData::MethodData *data = metaData->methodData() + id;
+ const QChar *body =
+ (const QChar *)(((const char*)metaData) + data->bodyOffset);
+
+ QString code = QString::fromRawData(body, data->bodyLength);
QmlContext *ctxt = qmlContext(object);
if (0 == (metaData->methodData() + id)->parameterCount) {