Thanks André.
Yes, I suppose that's true! Did I mention how old some of this code is? :-)
This might be a good case for clang-tidy (if it doesn't already exist).
Right now it recommends "using".
Even doing that I get something a little off - two indents instead of one:
struct FooInfo
{
QString name;
QString code;
};
I assume this has to do with the setting for public/private indentation,
though I would expect if those keywords aren't present it wouldn't add the
extra indent.
---
Andy Maloney // https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
On Sat, Oct 20, 2018 at 5:40 AM André Pönitz <[email protected]> wrote:
> On Fri, Oct 19, 2018 at 06:50:57AM -0400, Andy wrote:
> > I've been updating some of my code from "typedef" to "using" style:
> >
> > typedef int foo;
> >
> > using foo = int;
> >
> >
> > When I try it with structs though the formatting gets all messed up in
> > Creator:
> >
> > using FooInfo = struct
> >
> > {
> > QString name;
> > QString code;
> >
> > };
>
>
> Given that this is C++, not C, the canonical way to write this would be
>
> struct FooInfo
> {
> QString name;
> QString code;
> };
>
> i.e. neither typedef nor using.
>
> Andre'
>
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator