Automatic new lines in qt design studio
-
wrote on 16 Aug 2022, 09:55 last edited by Joe McGuchan
In qt design studio I have a snippet of code
Connections { target: sceneButton onPressed: console.log(model.sceneName + " Selected") }
when I save the .ui.qml file it automatically changes the code to
Connections { target: sceneButton onPressed: console.log( model.sceneName + " Selected") }
this is, in my opinion, hideous. However when I go into the settings for the automatic edits on saving and deactivate every one, the problem persists. s there any way to stop design studio doing whatever this is? Thank you.
EDIT: I wanted to bump this topic with a slightly different question.
Is there a way to strop the automatic code formatting altogether?
By company places comments at the top of files with file data, design studio wants to put two new lines before these comments. This is stupendously terrible. Is there any way to just turn of ALL the automatic code formatting instead?
-
wrote on 29 Aug 2022, 15:41 last edited by Thomas Hartmann
This is a bug in the code formater for QML/JavaScript and should be fixed.
-
wrote on 5 Sept 2022, 10:49 last edited by
Has it been logged as a bug?
-
wrote on 25 Oct 2022, 11:12 last edited by
I wanted to bump this topic with a slightly different question.
Is there a way to strop the automatic code formatting altogether?
By company places comments at the top of files with file data, design studio wants to put two new lines before these comments. This is stupendously terrible. Is there any way to just turn of ALL the automatic code formatting instead?
-
wrote on 1 Nov 2022, 11:54 last edited by
At this point in time .ui.qml files are always formatted. We can consider adding an option, but I would prefer to fix the code formatter. Can you file a bug report for this?