Skip to content

Reformat connect to lambda code

Vlad Zahorodnii requested to merge work/zzag/clang-format-prepare into master

clang-format formats

connect(foo, &Foo::barChanged, this, [this]() {
    la-la-la
});

more nicely than

connect(foo, &Foo::barChanged, this,
    [this]() {
        la-la-la
    }
);

Besides clang-format tolerating the proposed format better than the current one, the proposed format is used more frequently and it's much compacter so more code will fit within the same amount of space.


lambdas were reformatted by hand after grepping the most common case and changing code style, not all connect()s may be reformatted, but most of them will reformatted

Merge request reports