Commit Graph

4 Commits

Author SHA1 Message Date
Uladzislau Paulovich
8dc16d55c2 qml | Fix empty objects formatting
Change-Id: I760f3420fef9ca83c2a28586575a72d580658d0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-11 15:22:36 +00:00
Marco Benelli
a874cf581d Qml/js reformatter: use quotes in objects literals
The reformatter used to remove the quotes that wraps the property name
in object literals.  This causes problem when the name is not a
valid identifier, resulting in that valid code become invalid after
reformatting.
This patch forces wrapping of property's name in quotes: in this way,
the reformatted code is consistent and it never get invalidated.

However the resulting formatted code is not consisted with the one
formatted by previous versions.

Task-number: QTCREATORBUG-17455
Change-Id: I1e361102819055de210d6c81020f204c08aaa253
Reviewed-by: Markus Maier <markus.maier.sw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-05 06:50:03 +00:00
Christian Kamm
ab64c1aef3 QmlJS indenter: Improve indentation of function expressions.
As discussed with Tor Arne and Fawzi in
http://codereview.qt-project.org/#change,18080

Change-Id: Ia0482d2ed3ddd61fa002e2c76b948301af52a795
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2012-03-06 17:26:46 +01:00
Christian Kamm
a24c49720a QmlJS reformatter: Fix object literals.
The comma token seems to be invalid.

Change-Id: I859fa58ba0ba1e975e0cf1105c2b53aac848fb0d
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-30 10:11:28 +01:00