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

fix: replace defines with constexpr/const and use more absolute paths for includes #5527

Merged
merged 10 commits into from
Aug 3, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jul 30, 2024

  • Replaces constant #defines with constexpr where possible. In case a QString is desired, they're replaced with a static QString.
    • For concatenations, QStringBuilder is required. This is included with QString in Qt 6 but requires an include in Qt 5
  • Uses paths relative to src/ for all includes. Check with rg -P '^#include "(?!Application|BrowserExtension|RunGui|ForwardDecl)[^"/]+"' -g 'src/**/*.{cpp,hpp}'.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

small incomplete review

src/common/Credentials.cpp Outdated Show resolved Hide resolved
src/common/Version.cpp Outdated Show resolved Hide resolved
src/widgets/helper/CommonTexts.hpp Show resolved Hide resolved
src/widgets/helper/NotebookButton.cpp Show resolved Hide resolved
src/widgets/settingspages/IgnoresPage.cpp Outdated Show resolved Hide resolved
@pajlada pajlada enabled auto-merge (squash) August 3, 2024 09:43
@pajlada pajlada merged commit aed55ac into Chatterino:master Aug 3, 2024
16 of 17 checks passed
@Nerixyz Nerixyz deleted the fix/no-define branch August 3, 2024 12:16
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.

3 participants