forked from qt-creator/qt-creator
QmlDesigner: Allow JavaScrip blocks in Connections in .ui.qml
Inside a Connections item JavaScript blocks should be allowed. Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
1562ec7bce
commit
2cab55ea1a
@@ -1252,6 +1252,11 @@ bool Check::visit(BinaryExpression *ast)
|
|||||||
|
|
||||||
bool Check::visit(Block *ast)
|
bool Check::visit(Block *ast)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
bool isDirectInConnectionsScope =
|
||||||
|
(!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("Connections"));
|
||||||
|
|
||||||
|
if (!isDirectInConnectionsScope)
|
||||||
addMessage(ErrBlocksNotSupportedInQmlUi, locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()));
|
addMessage(ErrBlocksNotSupportedInQmlUi, locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()));
|
||||||
|
|
||||||
if (Node *p = parent()) {
|
if (Node *p = parent()) {
|
||||||
|
Reference in New Issue
Block a user