diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-12-11 13:44:56 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-08 10:04:43 +0100 |
commit | fb377763ac3eea4010c7a501b8363ca46874a5b3 (patch) | |
tree | db7e22d735b72f7a13c54ddfa116f6209480a1e8 /src/qml/qml/qqmlobjectcreator_p.h | |
parent | 2f185926500dba417b95ff33b0546c0d8d3ce9c0 (diff) |
[new compiler] Fix signal handlers for properties declared in the same object
We need to generate the property caches before we can try converting the
signal handler expressions in the AST to function declarations, as that
conversion requires looking up the signal signature / meta-data from the
property cache. This in turn requires rewriting the property cache
generator code to operate on the data structure we have before creating
the QV4::CompiledData.
Change-Id: I0d1c59d947f36171b4eb89f47a2e1ff1bc493c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator_p.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index e33e47edcc..d395f0238f 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -54,25 +54,27 @@ class QQmlAbstractBinding; struct QQmlCompilePass { QQmlCompilePass(const QUrl &url, const QV4::CompiledData::QmlUnit *unit); + QQmlCompilePass(const QUrl &url, const QStringList &stringTable); QList<QQmlError> errors; + QString stringAt(int idx) const { return qmlUnit ? qmlUnit->header.stringAt(idx): stringTable.at(idx); } protected: - QString stringAt(int idx) const { return qmlUnit->header.stringAt(idx); } void recordError(const QV4::CompiledData::Location &location, const QString &description); const QUrl url; const QV4::CompiledData::QmlUnit *qmlUnit; + const QStringList stringTable; }; class QQmlPropertyCacheCreator : public QQmlCompilePass { Q_DECLARE_TR_FUNCTIONS(QQmlPropertyCacheCreator) public: - QQmlPropertyCacheCreator(QQmlEnginePrivate *enginePrivate, const QV4::CompiledData::QmlUnit *qmlUnit, + QQmlPropertyCacheCreator(QQmlEnginePrivate *enginePrivate, const QStringList &stringTable, const QUrl &url, const QQmlImports *imports, QHash<int, QQmlCompiledData::TypeReference> *resolvedTypes); - bool create(const QV4::CompiledData::Object *obj, QQmlPropertyCache **cache, QByteArray *vmeMetaObjectData); + bool create(const QtQml::QmlObject *obj, QQmlPropertyCache **cache, QByteArray *vmeMetaObjectData); protected: QQmlEnginePrivate *enginePrivate; |