diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-11-26 10:01:56 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-11-26 10:02:56 +0100 |
commit | ee6aa999ab0439dcb7a95af3dc9905a6daf13491 (patch) | |
tree | 8c83fc72ce62676b8431a1226f9cb9d6f39da4a0 /src/qml/compiler/qqmlcodegenerator.cpp | |
parent | f449534020adc8623ebfced5daae331ef56c4421 (diff) | |
parent | ce38c71b1c300f700a9ff004b7c163cc290ecae9 (diff) |
Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative into stable
Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
Diffstat (limited to 'src/qml/compiler/qqmlcodegenerator.cpp')
-rw-r--r-- | src/qml/compiler/qqmlcodegenerator.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator.cpp b/src/qml/compiler/qqmlcodegenerator.cpp index dcfad00472..c32ad2958d 100644 --- a/src/qml/compiler/qqmlcodegenerator.cpp +++ b/src/qml/compiler/qqmlcodegenerator.cpp @@ -1298,7 +1298,7 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<AST::N return runtimeFunctionIndices; } -static QQmlPropertyData *lookupQmlCompliantProperty(QQmlPropertyCache *cache, const QString &name, bool *propertyExistsButForceNameLookup = 0) +QQmlPropertyData *JSCodeGen::lookupQmlCompliantProperty(QQmlPropertyCache *cache, const QString &name, bool *propertyExistsButForceNameLookup) { if (propertyExistsButForceNameLookup) *propertyExistsButForceNameLookup = false; @@ -1314,6 +1314,13 @@ static QQmlPropertyData *lookupQmlCompliantProperty(QQmlPropertyCache *cache, co if (pd && !cache->isAllowedInRevision(pd)) pd = 0; + // Return a copy allocated from our memory pool. Property data pointers can change + // otherwise when the QQmlPropertyCache changes later in the QML type compilation process. + if (pd) { + QQmlPropertyData *copy = pd; + pd = _function->New<QQmlPropertyData>(); + *pd = *copy; + } return pd; } |