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 current CPU architecture detection with rosetta2 #11376

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

fmoc
Copy link
Contributor

@fmoc fmoc commented Nov 16, 2023

This PR uses a syscall to properly detect whether the application is running inside of macOS's rosetta2 emulator. It replaces uses of QSysInfo::currentCpuArchitecture() with a custom in our code.

It further extends the about dialog to show the detected build and CPU architectures.

This is a preparation for #10757.

Please note that the formatting changes are forced by clang-format. I'm not a fan of them.

@fmoc fmoc requested a review from a team November 16, 2023 17:17
@TheOneRing
Copy link
Contributor

If you really want to you can enforce new lines with //

@fmoc fmoc enabled auto-merge (squash) November 17, 2023 11:23
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@fmoc fmoc merged commit 295e9ef into master Nov 17, 2023
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the work/macos-rosetta2-currentArch branch November 17, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants