Inconsistent code style across QTermWidget
Expected Behavior
I'd like the code to look consistent (same use of brackets, tabs, spaces, naming, etc.) across the different classes of QTermWidget.
Current Behavior
Every file has it's own style.
Possible Solution
Agre on a basic code style (maybe following Qt own rules) and enforce it with .clang-format file in the repo.
Steps to Reproduce (for bugs)
Context
I'm trying to read the code and go through it making modifications and improvements, but the differences between classes in the style makes it more difficult.
System Information
- Distribution & Version:
- Kernel:
- Qt Version:
- lxqt-build-tools Version:
- Package version:
I agree and think that @yan12125 agrees more.
As far as I remember @yan12125's advices, this is the main style here:
if (X)
{
Y;
}
i.e., the curly brackets should always be present and the indentation is done by four spaces (not a text tab). But he could explain it better.
I'll ship a PR with the .clang-format file following Qt for the general with the addition rules you mention (brackets and spaces). We can modify the file later in the PR or other PRs. At least it's a start!