aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlcodegenerator_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qqmlcodegenerator_p.h')
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index 43bc979205..d077bff6db 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -347,13 +347,14 @@ private:
struct Q_QML_EXPORT JSCodeGen : public QQmlJS::Codegen
{
- JSCodeGen(const QString &fileName, const QString &sourceCode, V4IR::Module *jsModule,
+ JSCodeGen(QQmlEnginePrivate *enginePrivate, const QString &fileName, const QString &sourceCode, V4IR::Module *jsModule,
QQmlJS::Engine *jsEngine, AST::UiProgram *qmlRoot, QQmlTypeNameCache *imports);
struct IdMapping
{
QString name;
int idIndex;
+ QQmlPropertyCache *type;
};
typedef QVector<IdMapping> ObjectIdMapping;
@@ -363,10 +364,14 @@ struct Q_QML_EXPORT JSCodeGen : public QQmlJS::Codegen
// Returns mapping from input functions to index in V4IR::Module::functions / compiledData->runtimeFunctions
QVector<int> generateJSCodeForFunctionsAndBindings(const QList<AST::Node*> &functions);
+ // Resolve QObject members with the help of QQmlEngine's meta type registry
+ virtual V4IR::Expr *member(V4IR::Expr *base, const QString *name);
+
protected:
virtual V4IR::Expr *fallbackNameLookup(const QString &name, int line, int col);
private:
+ QQmlEnginePrivate *engine;
QString sourceCode;
QQmlJS::Engine *jsEngine; // needed for memory pool
AST::UiProgram *qmlRoot;