Commit Graph

5 Commits

Author SHA1 Message Date
Eike Ziller
8e69decd69 Revert "ClangFormat: Relax the clang format file a little bit"
That change does an experiment on the clang format file without
discussing the results before. It wasn't tested and discussed on a
larger code base, and ignores tests/manual/clang-format-for-qtc.

Individual ("pre-discussion") experiments with the clang-format file
should be done in a separate experimental version instead (e.g.
somewhere in dist/).

This reverts commit 009c2745e2.

Change-Id: I5f9fa50d2ccc63807218ae5d193a3a0718956576
Reviewed-by: hjk <hjk@qt.io>
2020-11-02 08:10:46 +00:00
Marco Bubke
009c2745e2 ClangFormat: Relax the clang format file a little bit
It will not always insert a line break after 100 sign but tries to find
middle ground. Normally it's not a problem but it will prevent some strange
looking formatting.

Change-Id: I0ba987f944d360b3d0f0d8dce29ef825696b1a92
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 09:52:59 +00:00
Ivan Donchevskii
40fcc728b2 ClangFormat: Use by default the same style as Qt Creator uses
Change-Id: Iae0f774873f66fcd4e297cfc260a8541f4373e36
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-07 14:03:45 +00:00
Ivan Donchevskii
e5c2b30e90 ClangFormat: Enable BreakStringLiterals in .clang-format
Change-Id: Icbd601c236cb5ad620d1bc7217a8629fe50a0046
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-27 10:20:52 +00:00
Ivan Donchevskii
ca84a51f86 Clang: Use clang-format for indentation
This is the new experimental plugin based on LibFormat.

It replaces the default indenter for CppEditorDocument
and applies clang-format after the CR or the set of 'electric'
characters.

Uses the global .clang-format kept in QtC settings or
the one for current project. Both can be configured.

For indentation some style modifications and code manipulations
are done to prevent line shrinking when it's not expected.

Manual indentation uses unmodified style from .clang-format file.

Change-Id: I6279b805e418e1804b553efa615f5c843f395a58
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-12 07:59:30 +00:00