Quick-Turn-Studio / CLionSupportForQt

19 stars 0 forks source link

Erroneous syntax error #46

Closed spiderkeys closed 1 year ago

spiderkeys commented 3 years ago

Qt Version: 6.2.0-beta1 CLion 2021.1.2

In the following snippet of code, 'y' (at the end) is being underlined with the following error:

QmlTokenType.CLOSE_BRACE or QmlTokenType.JS_COMMAND_END expected, got 'y'
Component.onCompleted: {
        // Set initial size based on screensize
        // Prefer the size of the screen, bounded by a min and max initial size
        let maxInitialWidth     = 1920
        let maxInitialHeight    = 1200
        width   = Math.min( maxInitialWidth, Math.max( minimumWidth, Screen.width ) )
        height  = Math.min( maxInitialHeight, Math.max( minimumHeight, Screen.height ) )

        // Center window upon creation
        x = ( Screen.width / 2 ) - ( width / 2 )
        y = ( Screen.height / 2 ) - ( height / 2 )
    }
spiderkeys commented 3 years ago

For whatever reason, it goes away if I put a ; after the x assignment line. Not sure why earlier assignment operations don't cause the same issue.

grabusr commented 1 year ago

Hi Charles

Finally we uploaded new QML Editor with new syntax parser. Reported bug should be fixed with version 2023.1.0