@@ -2578,6 +2578,69 @@ exports.test_data = {
2578
2578
input_ : 'xml=<a b="c"><d/><e>\n foo</e>x</a>;' ,
2579
2579
output : 'xml = < a b = "c" > < d / > < e >\n foo < /e>x</a > ;'
2580
2580
} ]
2581
+ } , {
2582
+ name : "qml true" ,
2583
+ description : "" ,
2584
+ options : [
2585
+ { name : 'qml' , value : true }
2586
+ ] ,
2587
+ tests : [
2588
+ { unchanged : 'property var x = {};' } ,
2589
+ { unchanged : 'readonly property var x = {};' } ,
2590
+ {
2591
+ unchanged : [
2592
+ '// MessageLabel.qml' ,
2593
+ 'import QtQuick' ,
2594
+ '' ,
2595
+ 'Rectangle {' ,
2596
+ ' height: 50' ,
2597
+ ' property string message: "debug message"' ,
2598
+ ' property var msgType: ["debug", "warning", "critical"]' ,
2599
+ ' color: "black"' ,
2600
+ '' ,
2601
+ ' Column {' ,
2602
+ ' anchors.fill: parent' ,
2603
+ ' padding: 5.0' ,
2604
+ ' spacing: 2' ,
2605
+ ' Text {' ,
2606
+ ' text: msgType.toString().toUpperCase() + ":"' ,
2607
+ ' font.bold: msgType == "critical"' ,
2608
+ ' font.family: "Terminal Regular"' ,
2609
+ ' color: msgType === "warning" || msgType === "critical" ? "red" : "yellow"' ,
2610
+ ' ColorAnimation on color {' ,
2611
+ ' running: msgType == "critical"' ,
2612
+ ' from: "red"' ,
2613
+ ' to: "black"' ,
2614
+ ' duration: 1000' ,
2615
+ ' loops: msgType == "critical" ? Animation.Infinite : 1' ,
2616
+ ' }' ,
2617
+ ' }' ,
2618
+ ' Text {' ,
2619
+ ' text: message' ,
2620
+ ' color: msgType === "warning" || msgType === "critical" ? "red" : "yellow"' ,
2621
+ ' font.family: "Terminal Regular"' ,
2622
+ ' }' ,
2623
+ ' }' ,
2624
+ '}'
2625
+ ]
2626
+ }
2627
+ ]
2628
+ } , {
2629
+ name : "qml false" ,
2630
+ description : "" ,
2631
+ options : [
2632
+ { name : 'qml' , value : false }
2633
+ ] ,
2634
+ tests : [
2635
+ {
2636
+ input : 'property var x = {};' ,
2637
+ output : 'property\nvar x = {};'
2638
+ } ,
2639
+ {
2640
+ input : 'readonly property var x = {};' ,
2641
+ output : 'readonly property\nvar x = {};'
2642
+ }
2643
+ ]
2581
2644
} , {
2582
2645
name : "Multiple braces" ,
2583
2646
description : "" ,
0 commit comments