aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsinterpreter.cpp
diff options
context:
space:
mode:
authorChristian Kamm <[email protected]>2010-02-17 09:16:28 +0100
committerChristian Kamm <[email protected]>2010-02-17 09:17:29 +0100
commit265118eb5e59d1be3fb507c86a9f3dd8b9b77fe9 (patch)
tree1047e247bbc9f2cd01a6b554bc8bd21f4269fb6a /src/libs/qmljs/qmljsinterpreter.cpp
parent1f411118bf8fc4119677e773d1d82bd6c6c8e86c (diff)
Add the onNameChanged signals that Qml properties generate implicitly.
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 34d7ac95f9e..caf472a12f5 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -2026,11 +2026,14 @@ bool ASTObjectValue::getSourceLocation(QString *fileName, int *line, int *column
void ASTObjectValue::processMembers(MemberProcessor *processor) const
{
- foreach (ASTPropertyReference *ref, _properties)
+ foreach (ASTPropertyReference *ref, _properties) {
processor->processProperty(ref->ast()->name->asString(), ref);
+ // ### Should get a different value?
+ processor->processGeneratedSlot(ref->onChangedSlotName(), ref);
+ }
foreach (ASTSignalReference *ref, _signals) {
- // ### These two should get different values?
processor->processSignal(ref->ast()->name->asString(), ref);
+ // ### Should get a different value?
processor->processGeneratedSlot(ref->slotName(), ref);
}
@@ -2125,6 +2128,11 @@ const Value *QmlPrototypeReference::value(Context *context) const
ASTPropertyReference::ASTPropertyReference(UiPublicMember *ast, const QmlJS::Document *doc, Engine *engine)
: Reference(engine), _ast(ast), _doc(doc)
{
+ const QString propertyName = ast->name->asString();
+ _onChangedSlotName = QLatin1String("on");
+ _onChangedSlotName += propertyName.at(0).toUpper();
+ _onChangedSlotName += propertyName.midRef(1);
+ _onChangedSlotName += QLatin1String("Changed");
}
ASTPropertyReference::~ASTPropertyReference()