QmlJS: Allow blocks in TimelineAnimation

We add signal handlers to TimelineAnimation since QDS 1.0.
We normalize those handler with braces and this should continue to work.

Task-number: QDS-15014
Pick-to: qds/4.7
Change-Id: Ib7a354d0e25a087aabe690ebda66f131b579d666
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
(cherry picked from commit a090d6d58f)
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2025-03-21 16:54:12 +01:00
committed by Thomas Hartmann
parent 3e6bfa242e
commit 5013daa7b0

View File

@@ -1482,7 +1482,7 @@ bool Check::visit(BinaryExpression *ast)
bool Check::visit(Block *ast)
{
const bool isDirectInConnectionsOrScriptActionScope
= isDirectInTypeScope("Connections"_L1, "ScriptAction"_L1);
= isDirectInTypeScope("Connections"_L1, "ScriptAction"_L1, "TimelineAnimation"_L1);
if (!isDirectInConnectionsOrScriptActionScope)
addMessage(ErrBlocksNotSupportedInQmlUi, locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()));