summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvme.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-05-05 08:39:27 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-05-05 08:39:27 (GMT)
commita189a500173ed038e777902ac0a77f837a330c26 (patch)
tree14f6cdb392bebeb97273501e26b9ebd08c89fa75 /src/declarative/qml/qmlvme.cpp
parentca4d0be72c35cd693cab61b35831f8392a44e09c (diff)
parent983b5260f5a2a0ef1788107618b523a37afe6268 (diff)
downloadQt-a189a500173ed038e777902ac0a77f837a330c26.zip
Qt-a189a500173ed038e777902ac0a77f837a330c26.tar.gz
Qt-a189a500173ed038e777902ac0a77f837a330c26.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r--src/declarative/qml/qmlvme.cpp47
1 files changed, 14 insertions, 33 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index e6235e4..ee7a881 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -176,9 +176,14 @@ QmlVME::QmlVME()
#define VME_EXCEPTION(desc) \
{ \
- exceptionLine = instr.line; \
- QDebug d(&exceptionDescription); \
- d << desc; \
+ QString str; \
+ QDebug d(&str); \
+ d << desc; \
+ QmlError error; \
+ error.setDescription(str); \
+ error.setLine(instr.line); \
+ error.setUrl(comp->url); \
+ vmeErrors << error; \
break; \
}
@@ -224,6 +229,8 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
QStack<QmlMetaProperty> pushedProperties;
QObject **savedObjects = 0;
+ vmeErrors.clear();
+
if (start == -1) start = 0;
if (count == -1) count = comp->bytecode.count();
@@ -270,27 +277,6 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
}
break;
- case QmlInstruction::CreateCustomObject:
- {
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxCompilerTimer<QFxCompiler::InstrCreateCustomObject> cc;
-#endif
- QVariant v =
- types.at(instr.createCustom.type).parser->create(datas.at(instr.createCustom.data));
- // XXX
- QObject *o = QmlMetaType::toQObject(v);
- if (!o)
- VME_EXCEPTION("Unable to create" << types.at(instr.create.type).className);
- QmlEngine::setContextForObject(o, QmlContext::activeContext());
-
- if (!stack.isEmpty()) {
- QObject *parent = stack.top();
- o->setParent(parent);
- }
- stack.push(o);
- }
- break;
-
case QmlInstruction::SetId:
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
@@ -334,7 +320,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
QFxCompilerTimer<QFxCompiler::InstrStoreMetaObject> cc;
#endif
QObject *target = stack.top();
- new QmlVMEMetaObject(target, mos.at(instr.storeMeta.data), comp);
+ new QmlVMEMetaObject(target, mos.at(instr.storeMeta.data), &comp->primitives, instr.storeMeta.slotData, comp);
}
break;
@@ -1072,17 +1058,12 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
bool QmlVME::isError() const
{
- return exceptionLine != -1;
-}
-
-qint64 QmlVME::errorLine() const
-{
- return exceptionLine;
+ return !vmeErrors.isEmpty();
}
-QString QmlVME::errorDescription() const
+QList<QmlError> QmlVME::errors() const
{
- return exceptionDescription;
+ return vmeErrors;
}
void QmlVME::runStoreInstruction(QStack<QObject *> &stack,