Skip to content

Use qt-lib platform constants instead of ad-hoc platform checks - #541

Merged
OrkunTokdemir merged 3 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_code_dup_05_08_2026
Aug 6, 2026
Merged

Use qt-lib platform constants instead of ad-hoc platform checks#541
OrkunTokdemir merged 3 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_code_dup_05_08_2026

Conversation

@OrkunTokdemir

Copy link
Copy Markdown
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

@OrkunTokdemir OrkunTokdemir changed the title orkun code dup 05 08 2026 Use qt-lib platform constants instead of ad-hoc platform checks Aug 5, 2026
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
OrkunTokdemir force-pushed the orkun_code_dup_05_08_2026 branch from de57927 to 06a30e3 Compare August 5, 2026 15:21
@OrkunTokdemir
OrkunTokdemir merged commit 0e087b2 into qt-labs:dev Aug 6, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants