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

readbility #285

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

readbility #285

wants to merge 4 commits into from

Conversation

luis-pereira
Copy link
Member

No description provided.

It improves readability.
Make everything explicit. Also improves readability.
Done by clang-tidy.
Increased readability.
@luis-pereira luis-pereira requested a review from tsujan March 9, 2021 17:07
QPalette::ColorGroup colorGroup = (option.state & QStyle::State_Active) ? QPalette::Active : QPalette::Inactive;
if (option.state & QStyle::State_Selected) // selected items
QPalette::ColorGroup colorGroup = (option.state & QStyle::State_Active) != 0u ? QPalette::Active : QPalette::Inactive;
if ((option.state & QStyle::State_Selected) != 0u) // selected items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really doubt that substitutions like the above ones could make the code more readable (there are some in other places too). I'm afraid I wanted to say the same thing about too much usage of nullptr but 0u might feel strange to code readers — especially if they're contributors who want to preserve the code style.

That being said, if you prefer them, there will be no objection from me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will come back to you on this.

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

Successfully merging this pull request may close these issues.

2 participants