forked from qt-creator/qt-creator
QmlDesigner: allow adding connections in ui.qml files
Change-Id: Ia4d9f01f41ca2bca1eca0df3cf121ae2800e31d4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
@@ -1548,8 +1548,11 @@ bool Check::visit(CallExpression *ast)
|
||||
SourceLocation location;
|
||||
const QString name = functionName(ast->base, &location);
|
||||
|
||||
//We have to allow the qsTr function for translation.
|
||||
if (name != QLatin1String("qsTr") && name != QLatin1String("qsTrId"))
|
||||
// We have to allow the qsTr function for translation.
|
||||
bool isTranslationFunction = (name == QLatin1String("qsTr") || name == QLatin1String("qsTrId"));
|
||||
// allow adding connections with the help of the qt quick designer ui
|
||||
bool isDirectInConnectionsScope = m_typeStack.last() == QLatin1String("Connections");
|
||||
if (!isTranslationFunction && !isDirectInConnectionsScope)
|
||||
addMessage(ErrFunctionsNotSupportedInQmlUi, location);
|
||||
|
||||
if (!name.isEmpty() && name.at(0).isUpper()
|
||||
|
Reference in New Issue
Block a user