diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-05-30 10:24:14 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 04:35:50 +0200 |
commit | c734706c69ed5b38cc97aea5be3f0553c194aa0a (patch) | |
tree | ec95a87fd3e3d9ad5d9b35c79b4beee291b99088 /src/qml/qml/qqmlengine.cpp | |
parent | 751c1ca09305a15acc37cb28cb4687e1bb32e1d2 (diff) |
Delay conversion of v8 exceptions to QQmlErrors.
This conversion in relatively expensive, and not required for transient
exceptions that occur during startup due to the order of binding
evaluation.
Change-Id: I29a16c075890c8966c0bad0a77412ad232c791bb
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 6b1c869ee8..7b4b827409 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1463,6 +1463,12 @@ void QQmlEnginePrivate::warning(const QList<QQmlError> &errors) dumpwarning(errors); } +void QQmlEnginePrivate::warning(QQmlDelayedError *error) +{ + Q_Q(QQmlEngine); + warning(error->error(q)); +} + void QQmlEnginePrivate::warning(QQmlEngine *engine, const QQmlError &error) { if (engine) @@ -1479,6 +1485,14 @@ void QQmlEnginePrivate::warning(QQmlEngine *engine, const QList<QQmlError> &erro dumpwarning(error); } +void QQmlEnginePrivate::warning(QQmlEngine *engine, QQmlDelayedError *error) +{ + if (engine) + QQmlEnginePrivate::get(engine)->warning(error); + else + dumpwarning(error->error(0)); +} + void QQmlEnginePrivate::warning(QQmlEnginePrivate *engine, const QQmlError &error) { if (engine) |