summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-22 05:37:39 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-22 08:01:48 (GMT)
commit3a75eeb5da34fbb50173c3f610c08d160c21f4e3 (patch)
treeab854f509d3a3720b74d2ef9d5e7803881078673 /src/declarative/qml/qmlexpression.cpp
parent0fe084df052b8ac66918d0b2732b65f5569881c0 (diff)
downloadQt-3a75eeb5da34fbb50173c3f610c08d160c21f4e3.zip
Qt-3a75eeb5da34fbb50173c3f610c08d160c21f4e3.tar.gz
Qt-3a75eeb5da34fbb50173c3f610c08d160c21f4e3.tar.bz2
Harden QML binding optimizer
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r--src/declarative/qml/qmlexpression.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index c00e552..dcc9c30 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -56,6 +56,20 @@ Q_DECLARE_METATYPE(QList<QObject *>);
QT_BEGIN_NAMESPACE
+bool QmlDelayedError::addError(QmlEnginePrivate *e)
+{
+ if (!e || prevError) return false;
+
+ if (e->inProgressCreations == 0) return false; // Not in construction
+
+ prevError = &e->erroredBindings;
+ nextError = e->erroredBindings;
+ e->erroredBindings = this;
+ if (nextError) nextError->prevError = &nextError;
+
+ return true;
+}
+
QmlExpressionData::QmlExpressionData()
: expressionFunctionValid(false), expressionRewritten(false), me(0),
trackChange(true), isShared(false), line(-1), guardList(0), guardListLength(0)