Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent code style across QTermWidget #472

Open
francescmm opened this issue Apr 9, 2022 · 2 comments
Open

Inconsistent code style across QTermWidget #472

francescmm opened this issue Apr 9, 2022 · 2 comments

Comments

@francescmm
Copy link
Contributor

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:
@tsujan
Copy link
Member

tsujan commented Apr 9, 2022

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.

@francescmm
Copy link
Contributor Author

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!

francescmm added a commit to francescmm/qtermwidget that referenced this issue Apr 10, 2022
francescmm added a commit to francescmm/qtermwidget that referenced this issue Apr 10, 2022
francescmm added a commit to francescmm/qtermwidget that referenced this issue Apr 10, 2022
francescmm added a commit to francescmm/qtermwidget that referenced this issue Apr 10, 2022
francescmm added a commit to francescmm/qtermwidget that referenced this issue Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants