forked from qt-creator/qt-creator
Blocks are no more considered bad per se. Only if they
contain a var statement they are considered as bad and
worth a warning.
Amends 2447d1d69c.
Change-Id: I93b5e43c01059b66f3fb287772e54f3ae3e157af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
35 lines
447 B
QML
35 lines
447 B
QML
import QtQuick 2.0
|
|
|
|
Rectangle {
|
|
function foo() {
|
|
{ // 115 9 9
|
|
var x = 10
|
|
}
|
|
{
|
|
let x = 10
|
|
}
|
|
|
|
if (a) {}
|
|
}
|
|
|
|
onXChanged: {
|
|
{ // 115 9 9
|
|
var y = 11
|
|
}
|
|
{
|
|
let y = 11
|
|
}
|
|
|
|
while (A) {}
|
|
}
|
|
|
|
property int d: {
|
|
{ // 115 9 9
|
|
var z = 12
|
|
}
|
|
{
|
|
let y = 12
|
|
}
|
|
}
|
|
}
|