Quick-Turn-Studio / CLionSupportForQt

19 stars 0 forks source link

[Bug]: error parsing [] in properties #61

Closed zdanek closed 1 year ago

zdanek commented 2 years ago

Plugin

QML Editor

Code example

// in example below two square brackets mean empty array which is ok, but QML editor marks it as a syntax error and breaks all QML code parsing // this is legit QML code, taken from QGroundControl // see lines 531 and 542 (or similar if code changes) // https://github.com/mavlink/qgroundcontrol/blob/master/src/PlanView/PlanView.qml

        // Airspace overlap support
        MapItemView {
            model:              _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : []
            delegate: MapCircle {
                center:         object.center
                radius:         object.radius
                color:          object.color
                border.color:   object.lineColor
                border.width:   object.lineWidth
            }
        }

Documentation reference

https://doc.qt.io/qt-6/qtqml-javascript-expressions.html

grabusr commented 1 year ago

Hi Bartek.

With new QML Editor version 2023.1 bug is fixed.