[Qt-creator] The state of the clang-format plugin

Nicolas Ulrich nikolaseu at gmail.com
Tue Jun 28 13:42:45 CEST 2022


Ok before saying anything else, thanks everyone for your work on Qt &
QtCreator!

On Tue, Jun 28, 2022 at 1:00 PM Riitta-Leena Miettinen <
Riitta-Leena.Miettinen at qt.io> wrote:

> Hello Nicolas,
>
>
>
> I’ve tried to explain the current behavior in the Qt Creator Manual 8.0
> snapshot here:
> https://doc-snapshots.qt.io/qtcreator-8.0/creator-indenting-code.html#automatic-formatting-and-indentation
>

Hi Leena,

Documentation is ok, it should just be more intuitive I guess, without the
need to read the manual.
I actually have QtCreator 7, it's just that the checkbox (combobox in
version 8) was not easy to find, since it's now inside the "Edit code
style" dialog.

This is not clear though (which configuration? all the code style
preferences or just indentation?):
"This creates a local configuration file that overrides the one stored in
the file system."


>
>
> Could you read the instructions and let me know whether they are helpful
> and correctly describe the current behavior? Or give me some pointers about
> what I should change.
>
>
>
> Cheers,
>
>
>
> Leena
>
>
>
>
>
> Leena Miettinen
>
> Sr. Documentation Engineer
>
> The Qt Company
> Erich-Thilo-Str. 10 12489
> Berlin, Germany
>
> riitta-leena.miettinen at qt.io <firstname.lastname at qt.io>
>
> www.qt.io
>
> Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen Sitz der
> Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB
> 144331 B
>
> <https://www.qt.io/>
>
> <https://www.facebook.com/qt/>
>
> <https://twitter.com/qtproject>
>
> <https://www.linkedin.com/company/the-qt-company/>
>
> <https://www.youtube.com/QtStudios>
>
>
>
>
>
>
>
> *From: *Christian Kandeler <christian.kandeler at qt.io>
> *Sent: *Tuesday, June 28, 2022 12:53
> *To: *qt-creator at qt-project.org
> *Subject: *Re: [Qt-creator] The state of the clang-format plugin
>
>
>
> On 6/28/22 12:43, Nicolas Ulrich wrote:
> > I just wanted to comment that I use "format instead of indenting"
> > (still works, but I cannot turn it off anymore I guess)
>
> It can still be turned off, by selecting "indent only" in the combo box.
>

Ok so I guess there were several changes.
This option wasn't that hard to find in some earlier versions if I remember
correctly.

Maybe you could make it easier with the "search field"? Right now the "code
style" tab (where the "edit code style" button is) is not highlighted when
writing either "format" or "clang".

For version 8 I hope I can still format just on demand, without
autoformatting every modified line on save?
"Select Full Formatting to use the Ctrl+I keyboard shortcut to format code
instead of indenting it and to apply the formatting to the edited code when
you save the file."


>
> > It was confusing when I tried to tell new developers (with a fresh
> > installation of QtCreator) and I couldn't find the option! Turns out
> > they just have to use the special shortcut for formatting now (if I
> > remember correctly). I'm still happy with Ctrl+i.
>
> I'm confused now. What is that special shortcut?
>

Nothing special, sorry, just:

Edit -> Advanced -> Auto-format Selection: "Ctrl + ;"

>
>
> Christian
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: B57D904DB7934B02A0C89120F6CF559A.png
Type: image/png
Size: 6489 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9BF5B06C7A2D4AC7BE62D310DCD68CD2.png
Type: image/png
Size: 695 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C6C2EFB47A2645D38C8192D19C9333E1.png
Type: image/png
Size: 873 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BD86E4BABA024C63998F3DAB23739924.png
Type: image/png
Size: 761 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6A46D48AB82B4C229E03844DB5DA1E01.png
Type: image/png
Size: 732 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220628/b02711a5/attachment-0009.png>


More information about the Qt-creator mailing list