| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* Add `-DQT_QML_DEBUG` and `-DQT_DECLARATIVE_DEBUG` to
`CMAKE_CXX_FLAGS_DEBUG_INIT` and `CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT`
Task-number: VSCODEEXT-14
Change-Id: I9bb941b2fbfad737185def9726868bc2d9133cde
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
| |
* Improve logging for coreAPI notifications
* Introduce `toString()` method for `QtWorkspaceConfigMessage`
Change-Id: I7e82196ca641a93ea2a960230203fe21a38c8b4e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When both `addtionalQtPaths` and `installationRoot` are set or updated,
KitManager tries to write the new configuration to the `cmake-kits.json`
. This might cause both handler to write the same file at the same time.
To prevent this, `FileWriter` queues the write requests and writes the
file one by one.
Change-Id: Ic41aae5139fc04644a48b7a14ae14b8fd41536a4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the previous implementation, the extensions were using only one way
to communicate with each other, which was getting a notification when a
config value was set or changed. This was problematic on startup because
there was no order in which the extensions were activated and when
messages were handled. b5bf26ac084823758be18453bb61579fefceb57c
partially fixed this issue by adding a way to wait for `qt-cpp` to be
ready, but it was still not enough. The extension should read config
values when they are ready, not when messages are sent from other
extensions.
Remove the `lazy` initialization parameter in `Project` classes. Instead
of using that parameter, we remove the firing event from `addProject()`
and only fire when the project is added after startup. This way, we
don't need the `lazy` parameter anymore.
Since `processMessage()` is not used during startup, this commit also
fixes QTBUG-131702 on the extension side.
qt-lib:
This commit changes `QtWorkspaceConfigMessage` and removes values in it.
`QtWorkspaceConfigMessage` is now used only to notify that a value or
values were set. The value `CoreApi` can be accessed by `getValue`
and `setValue`.
* Update the `CoreApi` interface
* Add `setValue`
* Rename `update` to `notify`
* Remove `get<T>()` from `QtWorkspaceConfigMessage`
qt-core:
* Remove the internal checking mechanism to understand if a value was
set or changed. Instead, just store values.
qt-cpp:
* Update `processMessage()` for the new usage.
* Initialize config values explicitly during startup.
qt-qml:
* Update `processMessage()` for the new usage.
* Separate starting `qmlls` from the constructor.
It should be started when the conditions are met.
* Get config values and update parameters inside `onProjectAdded()`
Task-number: QTBUG-131702
Change-Id: If9831ea1257d123f777e6ae2afb92f33942dd3da
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`kitManager.checkForAllQtInstallations()`, `KitManager.addProject` and
`this.onProjectAdded()` try to write to `cmake-kits.json` at the same
time. This generates a race condition that can lead to the file being
corrupted.
To fix this, we add projects to both `KitManager` and `ProjectManager`
lazyly during startup.
Change-Id: I5fc5199a33bb2d072eb52f8adc41df89e38722d8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Since qt-core's reset() is already sending the action and it also
executes qt-cpp's reset(), there is no need to send the action from
qt-cpp's reset().
Task-number: VSCODEEXT-90
Change-Id: Ie33e29cf4e68d9571c731ecd96426ad5b4249b61
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
| |
Change-Id: I11d6963f122642f91e4b436fe8fc2bd4b5ce2151
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Ben Cho <ben.cho@qt.io>
|
| |
|
|
|
|
|
|
|
| |
* Analyze the selected kit toolchain and the Qt version and send
telemetry data to the server.
* Introduce `QtVersionFromKit()` to reduce code duplication.
Change-Id: Ia92f03f0c1bb18d3c69db5c7b0b485a6d8cd9099
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Since `onQtInstallationRootChanged()` and `onQtPathsChanged()` might
write to `cmake-kits.json`, we need to make sure that the writing is
synchronous. Otherwise, the file might be corrupted.
Change-Id: I1bfa84621386e3aa94c725179e50bbb18d5dd152
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: Iedf682dbbcafdacff4408baa7ad71afc66f17d2b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
| |
Fixes: VSCODEEXT-109
Change-Id: Ib565e7bbf13d4f44d94f0d67f14cdea3bc3214d5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Since event handlers are not disposed properly, they are still active
when the project is closed. This can cause those handlers to be called
after the project is closed, which can lead to errors.
* Dispose project managers inside `Deactivate()`
Change-Id: Idd7b8548f7c16c41c0e4fd7052fa7ae988678bc4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
| |
Change-Id: I03e8844ec496966836abbc2f8ca3c75294a42d00
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
| |
https://github.com/qt-labs/vscodeext/actions/runs/12064539246/job/33641547880
Change-Id: Id613337ad217b575cb76bfee26760eb27dc62abf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Many projects are not prepared for multi-config generators. Use the
single-config Ninja generator as default to avoid nasty surprises.
This also enables us to remove code where we set the preferred generator
to Ninja for certain target platforms.
Fixes: VSCODEEXT-108
Change-Id: I969b4b40752530efff2aa564402f9079f5647dc8
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
|
| |
|
|
|
|
|
|
| |
We didn't set platform/toolset on the Ninja Multi-Config generator. Do
that also for the single-config Ninja generator.
Change-Id: I55cc0abd059b0137599d58272201e539e74041dc
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
* Pass the build directory to qmlls with `-b`
* Detect the build directory change from the CMake extension
Change-Id: I8279b444036e174762f9d469fd8b4abdaba66e83
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
When only the value is checked whether it is undefined or not, it
doesn't give us the correct result because the value either can be
set to undefined or not set at all. We get undefined in both cases.
We should check the key is set in the message first instead.
Change-Id: Ic4c17e96c3975adcbc49eb82e7b1999d3dcec851
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
| |
* Update package.json
* Add `qt-cpp.doNotAskForCMakePath`
Fixes: VSCODEEXT-102
Change-Id: Ia31715e40a4e0abc0aa42c9ef3d76033786fcbea
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
| |
When `watchProjects()` is called in both `ProjectManager`s and
derived classes constructors, `onDidChangeWorkspaceFolders()` is called
twice for the same event. This causes a project to be added twice.
Change-Id: I9c026ea3865afb556e372dfc672d84caad1371f0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
When we don't filter out non-built-in values from kit `PATH` environment
variable, we copy some unnecessary values like `ARCH`,
`MSVC_MAJOR_VERSION`. So, we need to filter out non-qtpaths values from
kit `PATH` environment variable.
Change-Id: I99e4c3d6a76f7a9f3de973c0bab579ad7eab615c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
* Send events when commands are executed
* Add https://www.npmjs.com/package/@vscode/extension-telemetry
* Update ThirdPartyNotices.txt
Task-number: VSCODEEXT-62
Change-Id: I7c88b0db55fa14da6d66025e7fa4458726f5ce6b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Since `qpaPlatformPluginPath` is a environment variable, it should be
renamed to `QT_QPA_PLATFORM_PLUGIN_PATH` to match other environment
variables.
Change-Id: Iff9e6ad003874a3ad64b56aa635eb2fed6dcb06e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Use `getQtInsRoot()` instead of `VSCODE_QT_INSTALLATION` everywhere to
also include `VSCODE_QT_FOLDER` for backward compatibility.
* Use `IsQtKit()` instead of checking environment variables directly.
Change-Id: I14cc01915c7682190130b5cf0c14b96c6fe70a36
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
When a qml project built with vcpkg is debugged, we get a missing qml
module errors like `module "QtQuick.Layouts" is not installed`.
So we should set the `QML_IMPORT_PATH` environment variable explicitly.
Fixes: VSCODEEXT-107
Change-Id: I3f717a9b8b94e9948f2cf3c4d62383e4d84e4477
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: I448a084f9100ec0ff39dadd9f552f65f0849dc56
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove `getSelectedQtInstallationPath()` use `getSelectedKit()` instead
Since we support both root installation kits and qtpaths, we cannot just
return the installation path of the selected kit. We need to return
the all kit information.
* Use only qtpaths exe paths to cache information
Since we store only qtpaths exe paths in `cmake-kits.json`, we don't
need to hash it with other values like name or isVCPKG. And also, we can
improving the performance by caching different kits but with the same
qtpaths.
* Implement `qt-cpp.qtDir` for debug templates on Windows
We have to return possible dll paths for qtpaths kits.
* Deprecate `qt-cpp.kitDirectory` and use `qt-cpp.qtDir` instead
We support both root installation kits and qtpaths. So we cannot just
rely on `qt-cpp.kitDirectory\bin` in debug templates. For qtpaths, we
need to return multiple paths.
* Remove `kit-directory.ts` and move content to `launch-variables.ts`
* Add `qt-cpp.qpaPlatfromPluginPath`
When we debug with Qt from vcpkg. We get the
`could not find or load the Qt platform plugin "windows" in "",` error
if we don't set the `QT_QPA_PLATFORM_PLUGIN_PATH` environment variable.
That's why we need to set `qt-cpp.qpaPlatfromPluginPath` according to
`cmake.buildType` either `debug` or `release` path.
* Locate Designer via qtpaths
To support using Designer from qtpaths, we need to locate the Designer
inside paths like `QT_HOST_BINS`, `QT_HOST_LIBEXECS`,
`QT_INSTALL_LIBEXECS`
* Remove error messages when a qtpaths kit selected
In the previous implementation, we showed an error message when a
qtpaths kit selected instead of root installation kits.
* Add Qt version detection from qtpaths
* Add selectedQtPaths to coreAPI
When a qtpaths kit is selected, we set `selectedQtPaths` to inform
other extensions.
* Move `queryHostBinDirPath` to `qt-ui/util.ts`
Since it is only used in `qt-ui`, we move it to `qt-ui/util.ts`
* Shorten `locateQtDesignerExePath()` to `locateDesigner()`
* Use `set designerClient()` and detach inside it
It is better encapsulation.
Task-number: VSCODEEXT-86
Task-number: VSCODEEXT-93
Task-number: VSCODEEXT-92
Change-Id: I0aadd4dd5e2f9508576dda70d24eb14de7796a86
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
In the current kit generation, `VSCODE_QT_INSTALLATION_ROOT` doesn't
address the acutal Qt installation root. It addresses a subdirectory
inside it. That's why it can be misleading. This commit renames it to
`VSCODE_QT_INSTALLATION` to make it more clear.
Change-Id: I40ea80786c7d73b9279efa9eb6160f8e9a52af20
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
* Update package.json & add `command-exists`
* Add kit generation for vcpkg
Task-number: VSCODEEXT-93
Change-Id: Iaae7c5b1cf1afc07a74544ad1840b13e3dba0350
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
Since the generation of `qt.toolchain.cmake` is added with `Qt6`, we
don't need to check for the file in `Qt5` and `Qt`.
Change-Id: I03a79eb6e9b6a027bb6ea96c5a13d635ed4b8248
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
* Fix linting errors
Change-Id: I933d8070b470a56db33451db7638d0d74744015e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Ben Cho <ben.cho@qt.io>
|
| |
|
|
|
| |
Change-Id: I91e5d87b4bd70b97f980d0737845cf3b888ac094
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
When generating msvc kit, using either platform info or
`visualStudioArchitecture` is not enough to generate correct msvc kits.
We should generate kits when both the platform info and
`visualStudioArchitecture` match. Otherwise, msvc kits may cause
incompatible architecture errors.
Change-Id: I58f6dd46a9dc713b58cd24d24c1f05a155dfe026
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
* Handle the workspace type in the beginning of the function
* Use the same code for both workspace types
Change-Id: Ifa7a5a1f5e7bc90e41688815e7ffc8181be80351
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
This patch shows a progress bar when `qt-core.additionalQtPaths` is
changed, and the kits are being generated.
Change-Id: I2b2f804fa6b0abce9fcc4df2d732a61781492a8d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
* Removed unused code
* Add new parameters to generalize usage of `generateMsvcKits`
Change-Id: Ic709da8603e735f686ccd95cfcbd9f0fef22de71
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
| |
Change-Id: I7396a10de2cee83f897785045c740a941b41fa04
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This new command opens the folder navigation dialog to select either a
`qmake` or a `qtpaths` executable. The selected executable is then added
to the global `qt-core.additionalQtPaths` configuration.
Change-Id: Ic1bfb8d5b32f98b8b8fd2b6656dea1222d580ec2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The `ProjectManager` classes in qt-core, qt-cpp are now derived from
the `ProjectManager` template class in qt-lib.
Rename `ProjectBase` to `Project` for simplcity and consistency.
Change-Id: I66492028f43eb8822e2be5cde87de8a97c214381
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: I86edbad3b6534d5f836a7536e564fe9577fe7f3a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: Idf48d31ab3c615d521125303d2ecaf774af91a47
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: I35d8c4195faa107d48fbcc2df34acbfeda8b011b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
| |
Since Qt5 does not provide a toolchain file, we don't need to add it to
the Qt5 kit.
Change-Id: I4fda16aa5f78dcb21700b41e0918654dab431715
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
| |
Change-Id: I726dc6387709d99df874188a3254353428682493
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
| |
Change-Id: Ia2e2b5eb29aa2efb3f441d6e6d0ea07950e7f621
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
| |
Fixes: VSCODEEXT-69
Change-Id: I5e6a8b7900ce7e0cabf2acc9b7a9706ee8a9351f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
| |
Since we generate kits from both the installation root and the qtPaths,
we should also consider qtPaths related kits while filtering cmake kits.
Change-Id: I1cc639a024298936d30813cde77ea462557081b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
| |
Change-Id: I1085256995872ac0698f6427c8279cf417004503
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sometimes kits with the same name can be generated according to
the query results from either `qtpaths` or `qmake`. This can cause the
user to select the wrong kit.
To avoid this, we need to add a new `name` property to
`additionalQtPaths`. This will allow users to specilaize their kits
with different names. Otherwise, the name will be the same as the
`qtpaths` or `qmake` query result.
* Add new type for `additionalQtPaths`
* Convert the old string parameter to the new type to have uniformity
Change-Id: I9c734c0c69cc19313e66808dad49ac72316f4243
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Project classes in the qt-core, qt-cpp modules are now prefixed with
Core- and Cpp- respectively, for improved consistency and clarity
across all modules.
Change-Id: I9d8025e91b9457717b6398afc9d4e0cb612e8c53
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
|