summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejsast_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejsast_p.h')
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h
index 0a83fe2..c1945ce 100644
--- a/src/declarative/qml/parser/qdeclarativejsast_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsast_p.h
@@ -2599,11 +2599,17 @@ public:
UiObjectInitializer *initializer)
: qualifiedId(qualifiedId),
qualifiedTypeNameId(qualifiedTypeNameId),
- initializer(initializer)
+ initializer(initializer),
+ hasOnToken(false)
{ kind = K; }
virtual SourceLocation firstSourceLocation() const
- { return qualifiedId->identifierToken; }
+ {
+ if (hasOnToken && qualifiedTypeNameId)
+ return qualifiedTypeNameId->identifierToken;
+
+ return qualifiedId->identifierToken;
+ }
virtual SourceLocation lastSourceLocation() const
{ return initializer->rbraceToken; }
@@ -2615,6 +2621,7 @@ public:
UiQualifiedId *qualifiedTypeNameId;
UiObjectInitializer *initializer;
SourceLocation colonToken;
+ bool hasOnToken;
};
class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember