Skip to content

qt-cpp: Fix Windows Qt module parsing from CMake File API && Refine Module names for the telemetry - #596

Open
OrkunTokdemir wants to merge 5 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_telemetry_08_10_2026
Open

OrkunTokdemir wants to merge 5 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_telemetry_08_10_2026

Conversation

@OrkunTokdemir

Copy link
Copy Markdown
Collaborator

Strip lib and architecture suffixes from Qt library names
to return clean Qt module names such as Qt6Core and Qt6Pdf.

benchoq
benchoq previously approved these changes Oct 13, 2026
@OrkunTokdemir
OrkunTokdemir force-pushed the orkun_telemetry_08_10_2026 branch 2 times, most recently from ffaf5e8 to d6bf8f8 Compare October 30, 2026 12:42
@OrkunTokdemir OrkunTokdemir changed the title qt-cpp: Fix Windows Qt module parsing from CMake File API qt-cpp: Fix Windows Qt module parsing from CMake File API && Refine Module names for the telemetry Oct 30, 2026
* Strip `lib` and architecture suffixes from Qt library names
to return clean Qt module names such as Qt6Core and Qt6Pdf.

* Remove trailing underscores and any suffixes after them from Qt library
names
The previous helper in util.ts only handled kits and resolved the kit
through the active folder instead of the project's own folder.

Add CppProject.getMajorQtVersion(), which reads QT_VERSION through
qtpaths for preset projects and uses the project's selected kit for
kit projects, the same way the natvis command determines the version.
Remove the old helper.
On macOS, Qt modules are read from framework names such as QtCore,
which do not include the major Qt version. Telemetry therefore reported
names like QtCore instead of Qt6Core.

Determine the major version once per update and log a warning if it
cannot be found. Only insert it after a leading Qt that is not already
followed by 5 or 6, so Qt3DCore becomes Qt63DCore and names that
already carry a version are left unchanged.
Replace the duplicated preset and kit handling with the project method.
The kit is now resolved for the active project's folder. Add a silent
parameter so the command still asks for a kit when none is selected.
Move the lib prefix, architecture suffix and underscore handling out of
the Windows parser into refineModuleName(), together with the macOS
major version insertion. The Windows parser keeps only the debug suffix
removal. Remove duplicates after refining, since different raw names
can end up as the same module name.
@OrkunTokdemir
OrkunTokdemir force-pushed the orkun_telemetry_08_10_2026 branch from 761b50f to c4fef91 Compare November 18, 2026 14:50
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