Use qt-lib platform constants instead of ad-hoc platform checks - #541
Merged
OrkunTokdemir merged 3 commits intoAug 6, 2026
Merged
Conversation
OrkunTokdemir
commented
Aug 5, 2026
Collaborator
- qt-lib, qt-core: Deduplicate the Windows drive-letter normalization
- qt-core, qt-qml: Use qt-lib platform constants
- Tests: Use qt-lib platform constants
Add normalizeDriveLetter() to qt-lib and use it in the webview dispatchers and the QML trace controller, which each carried an identical inline copy of the same fix-up.
Replace ad-hoc process.platform and os.platform() checks with IsWindows/IsLinux/IsMacOS, and os.homedir() with Home, which is the constant the rest of the extension already uses for the user's home directory. All affected files already import from qt-lib.
Replace local isWin/isMac/isLinux derivations and process.platform checks with IsWindows/IsMacOS/IsLinux, and hard-coded '.exe' suffixes with OSExeSuffix. kitsPath() now builds on UserLocalDir, which matches how CMake Tools resolves its kits file (honoring LOCALAPPDATA and XDG_DATA_HOME instead of assuming the default locations). The registerQt test derives the portable candidate from Home, the same constant getDefaultQtRootCandidates() uses in production.
OrkunTokdemir
force-pushed
the
orkun_code_dup_05_08_2026
branch
from
August 5, 2026 15:21
de57927 to
06a30e3
Compare
benchoq
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.