QmlDesigner: Fix changing of dynamic properties

We have to use lastSourceLocation().end() instead of offset.
SourceLocation was refactored and this was forgotten.

Change-Id: I6a43b42b48e03b6b289173a85f5a4a98b2a44628
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-07-30 15:07:15 +02:00
parent 6e84529a88
commit 3363e42024

View File

@@ -142,7 +142,7 @@ void ChangePropertyVisitor::replaceMemberValue(UiObjectMember *propertyMember, b
if (publicMember->semicolonToken.isValid()) if (publicMember->semicolonToken.isValid())
endOffset = publicMember->semicolonToken.end(); endOffset = publicMember->semicolonToken.end();
else else
endOffset = publicMember->statement->lastSourceLocation().offset; endOffset = publicMember->statement->lastSourceLocation().end();
} else { } else {
startOffset = publicMember->lastSourceLocation().end(); startOffset = publicMember->lastSourceLocation().end();
endOffset = startOffset; endOffset = startOffset;