aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update Changelog to v3.1.0v3.1.0Miguel Costa2024-01-171-0/+25
| | | | | | Change-Id: I805f6645f20bd463afa6ba61dbd8e7b3fe289857 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io>
* Squish: Test building created projectsRobert Löhning2024-01-172-0/+39
| | | | | Change-Id: Idc50b1cc93d712b9c7f6f8582fac63a237d03dd2 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Verify that expected files are createdRobert Löhning2024-01-171-1/+53
| | | | | Change-Id: Ibfff62c89f8c46404abf4038a6fddb2abd1d9392 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove unreachable code, viOld is always nullKarsten Heimrich2024-01-171-16/+3
| | | | | | Change-Id: Iedf7dce303f1d8bd4264a1a49472680e54fbc5fc Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Amend 79c929 - postpone deleting the registry keys to v3.2.0 releaseKarsten Heimrich2024-01-171-2/+2
| | | | | | Change-Id: Ie425136e22fcbda4255963c20237fb21d3ac1883 Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Add QML LSP clientMiguel Costa2024-01-1610-30/+439
| | | | | Change-Id: Ia833267f8790bcec47cf16c9aa8a53b57c70d954 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Merge both getter methods to fetch Qt version informationKarsten Heimrich2024-01-1612-61/+63
| | | | | | | | * Merges both caches into the version information class itself. * Adapt depending code and classes to the function name changes. Change-Id: I308a0646af815be220f17902e01391819cb33ac8 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Convert QtVersionManager to a fully static classKarsten Heimrich2024-01-1614-63/+40
| | | | | | | | | * Removed the static instance member and associated lazy instantiation. * Refactored all methods to be static, there is no shared mutable state anyways. Change-Id: I51b8addc81c462c0b7b3dea5a79547960727b722 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Refactor Qt version information retrieval for improved concurrencyKarsten Heimrich2024-01-1614-84/+71
| | | | | | | | | | * Removed unnecessary initialization delays on extension loading. * Ensured thread safety using a semaphore for cache access. * Utilized concurrent dictionary for version information caching. * Cleaned up code for clarity and maintainability. Change-Id: I01f4d8f4b1bd575d28fa3d3f09c46af7f0fe4c32 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Safe the Qt version the user addedKarsten Heimrich2024-01-161-3/+16
| | | | | | | | | | In case there was no Qt version available when the wizard is run and the user added a Qt version using the error label, store it as default version. Change-Id: Ida4a28954f5e8ed5fa71430f3c01ba33d940cca3 Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix button state logic on the wizard config pageKarsten Heimrich2024-01-161-7/+5
| | | | | | | | | | | | | | | | | | * Always store the initial state of the 'Next' and 'Finish' button. * Do not overwrite the initial state of the buttons once we have configured a new Qt version (if there was non before). When starting certain wizards, such as the {Empty, Console, QML} wizard, there is no subsequent page after the configuration page. The logic for the 'Next' and 'Finish' button was broken, especially when no Qt version was configured. Attempting to set up a Qt version using the error message (a label one can click on) resulted in unnecessary overwriting of the initial state of the 'Next' and 'Finish' button in the ErrorMsg_OnMouseDown() function. Change-Id: I2efbe631bcb567997e349418016c0174cbb4a076 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io>
* Adapt wizard template code to cppwinrt templatesKarsten Heimrich2024-01-164-66/+56
| | | | | Change-Id: I3f30da062d41ceb782042184538ee93b998125a9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Lazy-load options page on the main threadMiguel Costa2024-01-161-2/+11
| | | | | | | | | | | QtOptionsPage will now be loaded on-demand only once and in the context of the main thread. Previously, accessing the Options property outside of the context of the main thread would generate an error. Also, GetDialogPage would be called for every access. Change-Id: I2d7a4146b6e702442a8906d1a62fe3f25141cc7f Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add circular log utilityMiguel Costa2024-01-164-1/+172
| | | | | | | Auto-rotating log file. Needed for logging QML-LSP messages. Change-Id: Id3fe9fd2b80ba57037807785e70e6152f946b2de Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Check state of "Finish" button at end of wizardsRobert Löhning2024-01-151-8/+11
| | | | | Change-Id: I3ae1ee7f458623277fc103f0e7117dedd5271d3e Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Ensure parameters of MakeRelative are quotedAli Can Demiralp2024-01-153-6/+6
| | | | | | | | | | This prevents cases where commas in filepaths interfere with the commas that are used to split the function parameters. Fixes: QTVSADDINBUG-1124 Change-Id: I83863d708f9bcacc45ba7b1de7af81af90248235 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Use objects recorded by Squish 7.2.1Robert Löhning2024-01-155-10/+11
| | | | | | | | | | | They provide better readability and also look more stable. Squish 7.1.0 can use these new objects while Squish 7.2.1 cannot handle the old ones. Task-number: SQUISH-16829 Change-Id: I4214eee31699b7e90eff67d37119102c068e36ca Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Katarina Behrens <katarina.behrens@qt.io>
* Squish: Update advice about missing Qt versionRobert Löhning2024-01-151-1/+1
| | | | | Change-Id: I86d25ad926e34a17473784a684a375c53d7d02ec Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Add test for files created by project wizardsRobert Löhning2024-01-124-1/+125
| | | | | Change-Id: I6a639cffc150188710187155f4d06ac6914dd93b Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Add test for changing project and class namesRobert Löhning2024-01-123-1/+71
| | | | | Change-Id: I832a006a54e82d8ceb1e986cf8ac73c2db2d9f7d Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Replace license headerRobert Löhning2024-01-122-52/+6
| | | | | Change-Id: Id744e4f59d0935ac8821f1954f318186c63bdd42 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix incorrect condition logic in qt_vars.targetsAli Can Demiralp2024-01-111-2/+2
| | | | | | Fixes: QTVSADDINBUG-899 Change-Id: Ie80f913eb035742e746945b88490f87b2ce86571 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix timeout in CriticalSection for large solutionsMiguel Costa2024-01-107-37/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MSBuild, building projects in parallel, especially ones with shared references (e.g. applications referencing the same library), can potentially create a race condition that leads to build errors when accessing shared resources. For this reason, we've introduced the CriticalSection task which uses a system-wide synchronization object to serialize parts of the build. Some issues with the CriticalSection task have been reported, namely that project builds fail with timeout errors while waiting to get access to the critical section. A constant timeout value, no matter how long, will eventually fail with a large enough solution. To work around this issue, acquiring the critical section lock will now use an adjustable timeout window, relative to the time of the most recent lock release. The following auto-tests are included: == Test_CriticalSection * FailByRaceConditionAsync: sanity check; start 100 unsynced background tasks in parallel and observe race condition. Expected to fail. * FailByTimeoutAsync: start 100 tasks synchronized by CriticalSection, with 10 secs timeout and 1 sec of work. Expected to fail due to timeout while waiting to acquire lock. * SerializedWorkAsync: start 100 tasks synchronized by CriticalSection, with 1 sec of work and 10 secs timeout calculated from the time of the most recent lock release. == Test_BigSolution * BigSolution_FailByTimeout: succeed in building a solution with 2 projects, but then fail to build a solution with 100 projects, due to timeout waiting for the critical section lock. Expected to fail. * BigSolution_TimeoutAdjustment: build a solution with 100 projects, with 10 secs timeout calculated calculated from the time of the most recent lock release. Fixes: QTVSADDINBUG-921 Change-Id: Ie803c220afc1226a59b1af69d4b4318f6c8ea80b Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Update license year from 2023 to 2024Ali Can Demiralp2024-01-09516-540/+540
| | | | | Change-Id: I38700243f7ef55239b247945324e4e0a978b097f Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Make adjustments to auto-testsMiguel Costa2024-01-0912-150/+166
| | | | | | | | | | | | | | | | | | == Test_QtMsBuild.Build * BigSolution test case available in auto-tests. * Call MSBuild out-of-proc: - New method 'Run' starts MSBuild.exe in a separate process. - In-proc calls to MSBuild API are still possible. * Print build messages to Debug output and test logs. == Test_QtMsBuild.Tasks * Renamed 'TestTaskLoggingHelper' to 'MockTaskLogger'. * Added 'MockBuildEngine' * Implemented mock build engine services: - RegisterTaskObject, UnregisterTaskObject, GetRegisteredTaskObject Change-Id: I5f1f0eff31aa1976ca451ae894115150c5907f82 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Make buildtime properties available to any projectMiguel Costa2024-01-094-36/+55
| | | | | | | | | To add this feature to a project, add EvalProps.cs and import EvalProps.targets at the end of the project file. Change-Id: I8302df3859da8519dbc25f248b6996cdf7926085 Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix Intellisense errors if vstools not installedMiguel Costa2024-01-091-2/+3
| | | | | | | | | | Opening the vstools solution in a VS instance which does not have an installed version of the extension would generate errors in the Intellisense build for the SampleTest project. (Even though this project is disabled in all configs, Intellisense still tries to build it.) Change-Id: Ib0e0c9fe86af6792a632b6e925924e9c5fc01cac Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Move all user keys to QtProject instead of keeping them in DigiaKarsten Heimrich2024-01-086-8/+12
| | | | | | | | | We missed this change for version 3.0.0, but it's not too late for it. Copy the registry keys as the first step when loading the extension, as some later code paths depend on these registry keys. Change-Id: I21edf47ec4ac51263a9a18c3c4b22fb8498b3451 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Split Utils class into partial files and introduce Utils.Registry.csKarsten Heimrich2024-01-083-2/+43
| | | | | | | | | | This commit refactors the Utils class by splitting it into partial files to improve maintainability. The new registry-related code is now located in Utils.Registry.cs, providing better organization and separation of concerns. Change-Id: Ia6bb3bf307c71dd3f1811ab4a955c05a0115fcb8 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Adjust namespace of Utils class to match folder structureKarsten Heimrich2024-01-0840-45/+54
| | | | | | Change-Id: I462c9cc4b96aaf354f77739da64202e2a7dc8af2 Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Some more code adjustmentsKarsten Heimrich2024-01-081-30/+24
| | | | | | | | | | * Add missing xml doc comment * Simplify using declarations * Remove unused bool return type * Invert if conditions to improve readability Change-Id: I60b075888139eee4d18922a5762b71d697d78479 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Simplify method IsVersionAvailable() using LINQKarsten Heimrich2024-01-081-9/+2
| | | | | Change-Id: I175451714e12c0287de13dd97ca7409fb8dd3c3b Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove SaveProjectQtVersion() unused bool return typeKarsten Heimrich2024-01-081-4/+3
| | | | | Change-Id: I1ca404438918d904906401641ef7a855e9428a64 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove method MergeVersions() from QtVersionManagerKarsten Heimrich2024-01-081-47/+3
| | | | | | | | We haven't created registry keys in Registry.LocalMachine for years and by now they should all have been copied to the user hive. Change-Id: Ic4bd10b75ac5e6491c3a47f8a5277ef0312f0901 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Shuffle around constant registry path valuesKarsten Heimrich2024-01-085-42/+24
| | | | | Change-Id: I674906eeea61bd36eec593a3b2f85ba46fce8664 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Use verbatim string as regexp patternKarsten Heimrich2024-01-081-1/+1
| | | | | Change-Id: Ia77e06ed87293c75422aafaa37fe29abdb0742d9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* $(QTDIR) or $(DefaultQtVersion) cannot be used as version nameKarsten Heimrich2024-01-081-0/+2
| | | | | | | | | | Because of the way these special identifiers in Qt Version managers are processed, we cannot allow them to be used as the version name. Both trigger path resolution and do not lead to the actual installation that was originally associated with the name. Change-Id: I793b1cc728d48f81bce6e0f0c474125b67ccc4a5 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix the command for computing the size of the banner fileAli Can Demiralp2024-01-031-2/+2
| | | | | Change-Id: Iaafe146546dadd4dec2fe885a6ccb85d8a7729c0 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Add vcvars architecture to deployment nameMiguel Costa2023-12-141-4/+4
| | | | | | | This will allow deploying 'x64' and 'arm64' packages to the same dir. Change-Id: Idf6d0dd4f48cb1308d5fe134d6359de367c20980 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add color highlighting to build script outputMiguel Costa2023-12-1416-42/+116
| | | | | Change-Id: I94bf20f08e7f466e0bc1208920d0d79c1666e334 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Open main.qml in active editor after project creationKarsten Heimrich2023-12-131-1/+2
| | | | | Change-Id: I536db7a7f923714996acf8c3dd70babe4a75729e Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Refactor vstools.batMiguel Costa2023-12-1118-484/+967
| | | | | | | | | | | | * Split single large script into component scripts * Added option to run auto-tests after build * Added option to specify 'vcvars' argument (e.g. arm64) * Added option to specify build platform * Additional error checking * Banner utility to print messages inside a frame Change-Id: I21364a2f5b3285f90e30fa7bfc3d7a1b19446bff Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove 'Any CPU' solution configurationMiguel Costa2023-12-111-210/+18
| | | | | Change-Id: I99282dde75ea97e011dec53595caa673a011c520 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Amend f30289d1Miguel Costa2023-12-064-11/+14
| | | | | | | | | | | | | * Build auto-tests will only be allowed for VS 2022. This is due to the extension not matching the platform used in tests. * Other test projects (Tasks, Core, Package) are now also included. * Removed unnecessary refs project test project. * Moved critical code path from Debug-only expression. In Release, the expression in not evaluated, so the test fails. * Use Assert.Inconclusive instead of throwing InvalidaOperation Change-Id: I8879dde023a868a822eab53718d5a912ea4dca48 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Check temp 'qmake' folder generated in IntDirMiguel Costa2023-12-042-0/+38
| | | | | | | | | | | | Unit-test to check the fix of the issue of changes to IntDir not being taken into account when generating Qt vars. This should be fixed as of e0d214ec36041d3ee9cb40f00c38c29ef259b5e3 Fixes: QTVSADDINBUG-860 Fixes: QTVSADDINBUG-872 Change-Id: I1ca508b77cb889f9789a288b7ccbe099b61f7d68 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Squish: Update menu text for VS2022Robert Löhning2023-11-301-1/+3
| | | | | | | 17.8.2 has a trailing ellipsis. Change-Id: Ia84e515f395dde499fcd8fd1df547190a14f9a41 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Squish: Handle the "Sign in" nagscreenRobert Löhning2023-11-302-0/+8
| | | | | Change-Id: I70657698b398fe5995eb7c5a7e206244aa6f968f Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix QML object watch not expanding property listMiguel Costa2023-11-281-10/+13
| | | | | | | | Amends d065e67d7f3f6d0085e10658422f8c821c296891 Fixes: QTVSADDINBUG-1138 Change-Id: Ia283dae959f9a1a06b0a05ff3aadd3161cad83ff Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Allow late-binding of Qt/MSBuild propertiesMiguel Costa2023-11-286-2/+125
| | | | | | | The QtDeployDir property is now defined as late-bound to $(OutDir). Change-Id: I5a596722aced3490760443b5b2f944e2dfc83ddd Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Amend 8146726, fix windeployqt args ignoredMiguel Costa2023-11-281-3/+13
| | | | | | Task-number: QTVSADDINBUG-1134 Change-Id: I4dd3ace2d600cc8ef781272663f610ee87aca58d Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>