Quick-Turn-Studio / CLionSupportForQt

19 stars 0 forks source link

[Bug]: using block comments inside method call breaks formatting and parsing #60

Closed zdanek closed 1 year ago

zdanek commented 1 year ago

Plugin

QML Editor

Code example

// using block comments inside method call is allowed in QML (I'm using 5.x) but this breaks syntax parsing and highlighting // look for / clipToViewPort / // code compiles so it's syntax is correct // heavily used in for example QGroundControl // https://github.com/mavlink/qgroundcontrol/blob/master/src/MissionManager/QGCMapPolygonVisuals.qml

Component {
    id:  traceMouseAreaComponent

    MouseArea {
        anchors.fill:       mapControl
        preventStealing:    true
        z:                  QGroundControl.zOrderMapItems + 1   // Over item indicators

        onClicked: {
            if (mouse.button === Qt.LeftButton && _root.interactive) {
                mapPolygon.appendVertex(mapControl.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */))
            }
        }
    }
}

Documentation reference

https://doc.qt.io/qt-6/qtqml-syntax-basics.html#comments

grabusr commented 1 year ago

Hi Bartek

Thank you for reporting this bug. We will look at this soon. We hope it will be quick fix, because currently we rewrite code parsing for QML code to support code completion.

zdanek commented 1 year ago

Thank you. Also highlighting matched brackets - all types is a must as it helps to see the scope.

czw., 6 paź 2022, 23:56 użytkownik Slawomir Grabowski < @.***> napisał:

Hi Bartek

Thank you for reporting this bug. We will look at this soon. We hope it will be quick fix, because currently we rewrite code parsing for QML code to support code completion.

— Reply to this email directly, view it on GitHub https://github.com/Quick-Turn-Studio/CLionSupportForQt/issues/60#issuecomment-1270739128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADLSJSZESZX7QJDSMRD3W3WB5DIDANCNFSM6AAAAAAQ6ROYJQ . You are receiving this because you authored the thread.Message ID: @.***>

grabusr commented 1 year ago

Hello Bartek. Finally we uploaded new QML Editor with new syntax parser. Reported bug should be fixed.