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

2022-07-08 Thread Björn Schäpers

Am 01.07.2022 um 15:11 schrieb Nikos Chantziaras:

On 01/07/2022 10:17, Eike Ziller wrote:

All that said, Artem reverted to the old checkboxes yesterday, so the RC will 
have the checkboxes again.


Thank you!


+1
Thanks for reevaluating the decision.
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-07-01 Thread Nikos Chantziaras

On 01/07/2022 10:17, Eike Ziller wrote:

I’m confused. I’m talking about Qt Creator 8.

The default setting for the ClangFormat plugin is “Indenting Only”. Which does 
not format on save at all.
The setting is (like in Qt Creator 7 unfortunately a bit hidden and that should be 
changed) in Preferences > C++ > Code Style > Edit.
The options for “Formatting mode” are “Indenting Only” (the default), “Full 
Formatting”, and “Disable”. The only option there that “formats on save” is 
“Full Formatting”, if you do not want that, switch to e.g. “Disable”, save, 
switch back on.


Well, I save and build all the time, so that just doesn't work for me. I 
thought you meant "set the format on save setting to disable", which I 
couldn't find.



All that said, Artem reverted to the old checkboxes yesterday, so the RC will 
have the checkboxes again.


Thank you!

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-07-01 Thread Eike Ziller


> On 30 Jun 2022, at 20:00, Nikos Chantziaras  wrote:
> 
> On 29/06/2022 22:11, Nikos Chantziaras wrote:
>> On 29/06/2022 17:33, Eike Ziller wrote:
>>> At the moment you can change the setting globally to “Disable”
>> Where is that setting found? Can't find it anywhere.
> 
> You probably meant Creator 7. In 8, that option is gone and there's no way to 
> prevent Creator from forcing my personal coding style everywhere.
> 
> I opened a bug about it:
> 
> https://bugreports.qt.io/browse/QTCREATORBUG-27781
> 
> IMO, this is a serious show stopper as it makes Creator completely unusable 
> when working on projects not under your control.

I’m confused. I’m talking about Qt Creator 8.

The default setting for the ClangFormat plugin is “Indenting Only”. Which does 
not format on save at all.
The setting is (like in Qt Creator 7 unfortunately a bit hidden and that should 
be changed) in Preferences > C++ > Code Style > Edit.
The options for “Formatting mode” are “Indenting Only” (the default), “Full 
Formatting”, and “Disable”. The only option there that “formats on save” is 
“Full Formatting”, if you do not want that, switch to e.g. “Disable”, save, 
switch back on.

All that said, Artem reverted to the old checkboxes yesterday, so the RC will 
have the checkboxes again.

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.zil...@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-30 Thread Nikos Chantziaras

On 29/06/2022 22:11, Nikos Chantziaras wrote:

On 29/06/2022 17:33, Eike Ziller wrote:

At the moment you can change the setting globally to “Disable”


Where is that setting found? Can't find it anywhere.


You probably meant Creator 7. In 8, that option is gone and there's no 
way to prevent Creator from forcing my personal coding style everywhere.


I opened a bug about it:

https://bugreports.qt.io/browse/QTCREATORBUG-27781

IMO, this is a serious show stopper as it makes Creator completely 
unusable when working on projects not under your control.


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread Nikos Chantziaras

On 29/06/2022 17:33, Eike Ziller wrote:

At the moment you can change the setting globally to “Disable”


Where is that setting found? Can't find it anywhere.

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread Eike Ziller


> On 29 Jun 2022, at 16:09, Nikos Chantziaras  wrote:
> 
> On 29/06/2022 09:40, Eike Ziller wrote:
>>> On 29 Jun 2022, at 05:26, Nikos Chantziaras  wrote:
>>> How are you supposed to deal with lines you didn't edit changing and have 
>>> no place in a git commit? It's impossible to work on code that's under 
>>> version control.
>> The ClangFormat plugin restricts formatting on save to the regions that you 
>> edited since last saving (the regions that have a green marker on the side.
> 
> This is unsuitable when you don't want to reformat the code. But more 
> importantly, when you undo, it breaks down. You edit something, then notice 
> it formatted when saving, you undo it, but it won't work. No matter what you 
> do, it will format it.

I definitely would like to have an easy way to trigger a save without 
formatting even while “format on save” is generally turned on.
At the moment you can change the setting globally to “Disable”, save the file, 
and turn the option back on, but it is cumbersome.

> I noticed it like an hour too late, when my git diff was a complete mess, as 
> it formatted code I didn't want touched.
> 
> At that point, I had to switch back to Creator 7.
> 
> This makes it virtually impossible to use Creator. Sure, if you only ever 
> work on your own code, it's fine. But I work on a ton of projects, most of 
> them don't even have a clang-format file.
> 
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.zil...@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread Nikos Chantziaras

On 29/06/2022 09:40, Eike Ziller wrote:

On 29 Jun 2022, at 05:26, Nikos Chantziaras  wrote:
How are you supposed to deal with lines you didn't edit changing and have no 
place in a git commit? It's impossible to work on code that's under version 
control.


The ClangFormat plugin restricts formatting on save to the regions that you 
edited since last saving (the regions that have a green marker on the side.


This is unsuitable when you don't want to reformat the code. But more 
importantly, when you undo, it breaks down. You edit something, then 
notice it formatted when saving, you undo it, but it won't work. No 
matter what you do, it will format it. I noticed it like an hour too 
late, when my git diff was a complete mess, as it formatted code I 
didn't want touched.


At that point, I had to switch back to Creator 7.

This makes it virtually impossible to use Creator. Sure, if you only 
ever work on your own code, it's fine. But I work on a ton of projects, 
most of them don't even have a clang-format file.


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread David Schulz
> 
> I'm confused now. What is that special shortcut?
> 

Ctrl + ; is the default shortcut for Auto-format Selection

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread Eike Ziller


> On 29 Jun 2022, at 08:40, Eike Ziller  wrote:
> 
> 
> 
>> On 29 Jun 2022, at 05:26, Nikos Chantziaras  wrote:
>> 
>> On 28/06/2022 12:06, Christian Kandeler wrote:
>>> On 6/25/22 10:58, Björn Schäpers wrote:
 in the days of yore you had 3 check marks for clang-format (still visible 
 here 
 https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png). 
 * Format instead of indenting
 * Format while typing
 * Format edited code on file save
 
 Nowadays the UI is gone, and at least option 2 is gone 
 (https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I 
 asked on why, but no answer yet.
>>> I suppose the assumption was that this was not needed. If it turns out 
>>> there are actually people using that, it can be brought back.
>> 
>> How are you supposed to deal with lines you didn't edit changing and have no 
>> place in a git commit? It's impossible to work on code that's under version 
>> control.
> 
> The ClangFormat plugin restricts formatting on save to the regions that you 
> edited since last saving (the regions that have a green marker on the side.

With a red marker, of course, not green. 

> 
> Br, Eike

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.zil...@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-29 Thread Eike Ziller


> On 29 Jun 2022, at 05:26, Nikos Chantziaras  wrote:
> 
> On 28/06/2022 12:06, Christian Kandeler wrote:
>> On 6/25/22 10:58, Björn Schäpers wrote:
>>> in the days of yore you had 3 check marks for clang-format (still visible 
>>> here 
>>> https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png). 
>>> * Format instead of indenting
>>> * Format while typing
>>> * Format edited code on file save
>>> 
>>> Nowadays the UI is gone, and at least option 2 is gone 
>>> (https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I 
>>> asked on why, but no answer yet.
>> I suppose the assumption was that this was not needed. If it turns out there 
>> are actually people using that, it can be brought back.
> 
> How are you supposed to deal with lines you didn't edit changing and have no 
> place in a git commit? It's impossible to work on code that's under version 
> control.

The ClangFormat plugin restricts formatting on save to the regions that you 
edited since last saving (the regions that have a green marker on the side.

Br, Eike

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.zil...@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Nikos Chantziaras

On 28/06/2022 12:06, Christian Kandeler wrote:

On 6/25/22 10:58, Björn Schäpers wrote:
in the days of yore you had 3 check marks for clang-format (still 
visible here 
https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png). 


* Format instead of indenting
* Format while typing
* Format edited code on file save

Nowadays the UI is gone, and at least option 2 is gone 
(https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I 
asked on why, but no answer yet.


I suppose the assumption was that this was not needed. If it turns out 
there are actually people using that, it can be brought back.


How are you supposed to deal with lines you didn't edit changing and 
have no place in a git commit? It's impossible to work on code that's 
under version control.


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Nicolas Ulrich
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.mietti...@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.mietti...@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 
> *Sent: *Tuesday, June 28, 2022 12:53
> *To: *qt-creator@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@qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
>
>
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Riitta-Leena Miettinen
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

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.mietti...@qt.io<mailto:firstname.lastn...@qt.io>

www.qt.io<https://www.qt.io>

Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen Sitz der 
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
[cid:image001.png@01D88AEE.EEEF4F60]<https://www.qt.io/>
[cid:image002.png@01D88AEE.EEEF4F60]<https://www.facebook.com/qt/>
[cid:image003.png@01D88AEE.EEEF4F60]<https://twitter.com/qtproject>
[cid:image004.png@01D88AEE.EEEF4F60]<https://www.linkedin.com/company/the-qt-company/>
[cid:image005.png@01D88AEE.EEEF4F60]<https://www.youtube.com/QtStudios>



From: Christian Kandeler<mailto:christian.kande...@qt.io>
Sent: Tuesday, June 28, 2022 12:53
To: qt-creator@qt-project.org<mailto:qt-creator@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.

> 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?


Christian

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Christian Kandeler

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.


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?


Christian

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Nicolas Ulrich
Hi Christian,

I just wanted to comment that I use "format instead of indenting"
(still works, but I cannot turn it off anymore I guess) and some days
ago I realized that the option was not available anymore.

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.

Nicolás

On Tue, Jun 28, 2022 at 11:07 AM Christian Kandeler
 wrote:
>
> On 6/25/22 10:58, Björn Schäpers wrote:
> > in the days of yore you had 3 check marks for clang-format (still
> > visible here
> > https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png).
> > * Format instead of indenting
> > * Format while typing
> > * Format edited code on file save
> >
> > Nowadays the UI is gone, and at least option 2 is gone
> > (https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I
> > asked on why, but no answer yet.
>
> I suppose the assumption was that this was not needed. If it turns out
> there are actually people using that, it can be brought back.
>
>
> Christian
>
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-28 Thread Christian Kandeler

On 6/25/22 10:58, Björn Schäpers wrote:
in the days of yore you had 3 check marks for clang-format (still 
visible here 
https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png).

* Format instead of indenting
* Format while typing
* Format edited code on file save

Nowadays the UI is gone, and at least option 2 is gone 
(https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I 
asked on why, but no answer yet.


I suppose the assumption was that this was not needed. If it turns out 
there are actually people using that, it can be brought back.



Christian

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


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

2022-06-25 Thread Björn Schäpers

Hi there,

in the days of yore you had 3 check marks for clang-format (still visible here 
https://doc.qt.io/qtcreator/images/qtcreator-code-style-clang-format.png).

* Format instead of indenting
* Format while typing
* Format edited code on file save

Nowadays the UI is gone, and at least option 2 is gone 
(https://codereview.qt-project.org/c/qt-creator/qt-creator/+/411513) I asked on 
why, but no answer yet. There was no reason or justification given, it was just 
removed. And it seems it formats now on saving, something I don't want, I can't 
turn it off anymore.


If I look into the changelog the only thing there is:
* clang-format
* Simplified options dialog

So I ask at least for some reasons or arguments why the functionality was 
removed, but better to restore the options. I don't want to maintain a fork.


King regards,
Björn.
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator