forked from qt-creator/qt-creator
QmlJS checks: Make 'unintentional empty block' warning less annoying.
Already fixed differently in master. Change-Id: I92f7665166b2b1ca4f3d4598825b04f3f19d4772 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -970,8 +970,7 @@ bool Check::visit(Block *ast)
|
||||
warning(ast->lbraceToken, tr("blocks do not introduce a new scope, avoid"));
|
||||
}
|
||||
if (!ast->statements
|
||||
&& (cast<UiPublicMember *>(p)
|
||||
|| cast<UiScriptBinding *>(p))) {
|
||||
&& cast<UiPublicMember *>(p)) {
|
||||
warning(locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()),
|
||||
tr("unintentional empty block, use ({}) for empty object literal"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user