Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beautify property in qml files #1754

Open
jgirardet opened this issue Feb 1, 2020 · 3 comments
Open

beautify property in qml files #1754

jgirardet opened this issue Feb 1, 2020 · 3 comments

Comments

@jgirardet
Copy link

Description

I'm not sure it could be covered by the tool.
I wanted to beautify qml files. Everything looks good except about var propeties

Input

The code looked like this before beautification:

TextField {
  id: control
  property var relativeX
  property real relativeY
  property int relativeY
}

Expected Output

The code should have looked like this after beautification:

TextField {
  id: control
  property var relativeX
  property real relativeY
  property int relativeY
}

Actual Output

The code actually looked like this after beautification:

TextField {
  id: control
  property
  var relativeX
  property real relativeY
  property int relativeY
}

It seems that only var property type is changed. I'm not sure it's a bug with javascript but it's one with qml files.

Environment

OS:

Settings

{
  "indent_size": "2",
  "indent_char": " ",
  "max_preserve_newlines": "2",
  "preserve_newlines": true,
  "keep_array_indentation": true,
  "break_chained_methods": false,
  "indent_scripts": "normal",
  "brace_style": "collapse",
  "space_before_conditional": true,
  "unescape_strings": false,
  "jslint_happy": false,
  "end_with_newline": false,
  "wrap_line_length": "80",
  "indent_inner_html": false,
  "comma_first": false,
  "e4x": false,
  "indent_empty_lines": false
}
@bitwiseman
Copy link
Member

bitwiseman commented Feb 3, 2020

do you have a link to the language description for QML?

@jgirardet
Copy link
Author

Even it's an old thing it seems that the real spec is still in progress : https://bugreports.qt.io/browse/QTBUG-81330
Relevant part of the docs :
https://doc.qt.io/qt-5/qtqml-documents-topic.html
https://doc.qt.io/qt-5/qtqml-syntax-basics.html
https://doc.qt.io/qt-5/qtqml-syntax-objectattributes.html

Do you have a precise question about it ?

@bitwiseman
Copy link
Member

@jgirardet
No specific question. I ask people to provide links to docs so that when someone chooses to work on this issue they will have sufficient information.

lo1ol added a commit to lo1ol/js-beautify that referenced this issue Jun 23, 2022
@lo1ol lo1ol mentioned this issue Jun 23, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants