aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.Core/QtVersionManager.cs
Commit message (Collapse)AuthorAgeFilesLines
* Correct style errors in CoreAli Can Demiralp2025-07-141-2/+2
| | | | | Change-Id: I17570e5eab6c0902691c521af408e30aa7dd1a7f Reviewed-by: Karsten Heimrich <[email protected]>
* Update copyright comments to 2025Ali Demiralp2025-03-181-4/+2
| | | | | Change-Id: I9ab1f8919a3d28cb546cd71bfdc8da1f6ae9e123 Reviewed-by: Karsten Heimrich <[email protected]>
* Refactor registry paths in Core and PackageAli Can Demiralp2024-07-291-16/+17
| | | | | Change-Id: I5a211d400c04f9d33dc69ae1aaf11f842f3eae86 Reviewed-by: Karsten Heimrich <[email protected]>
* Store settings and versions per root suffixAli Can Demiralp2024-07-291-1/+1
| | | | | | | | | The settings and registered versions are no longer global across instances of Visual Studio, and instead are defined per root suffix. Fixes: QTVSADDINBUG-1088 Change-Id: I566ed01d76f5c00b37f86712be300c9c8751125e Reviewed-by: Karsten Heimrich <[email protected]>
* Redesign the layout of the Qt version pageKarsten Heimrich2024-07-241-16/+19
| | | | | | Change-Id: I796e92f5a5b57f8075d12274258585fbf8e6793a Reviewed-by: Miguel Costa <[email protected]> Reviewed-by: Ali Can Demiralp <[email protected]>
* Amend 50a2aa, fix storing version names with spacesKarsten Heimrich2024-05-061-2/+2
| | | | | | | Fixes: QTVSADDINBUG-1196 Change-Id: Ic832a1cdcc1dc9be77ba59587e66465cf10a46d8 Reviewed-by: Ali Can Demiralp <[email protected]> Reviewed-by: Karsten Heimrich <[email protected]>
* Fix user settings not migrated after upgrading to version 3.2.0Karsten Heimrich2024-04-251-8/+15
| | | | | | | Fixes: QTVSADDINBUG-1195 Change-Id: I0f586c08010d1ce1a21ced5e4d964a58cab5d309 Reviewed-by: Ali Can Demiralp <[email protected]> Reviewed-by: Karsten Heimrich <[email protected]>
* Add a new and rename existing constants specifying registry pathsKarsten Heimrich2024-03-271-10/+9
| | | | | Change-Id: I35a0183cc00945b9a0a57212d657de4eaddc9b16 Reviewed-by: Miguel Costa <[email protected]>
* Inform user if project Qt installation property is invalidAli Can Demiralp2024-03-261-2/+2
| | | | | | Task-number: QTVSADDINBUG-1132 Change-Id: I4d86de650db1acc723ec579bd6d5108e955a06a6 Reviewed-by: Karsten Heimrich <[email protected]>
* Centralize Qt version name sanitizationKarsten Heimrich2024-03-141-1/+16
| | | | | | | | | | Previously, only SaveVersion() sanitized version names, potentially leading to naming inconsistencies since SaveDefaultVersion() required similar treatment. Now, both functions sanitize the name before storing it in the registry. Change-Id: I53d89803e234bfc9cdeb005a047e66859d47abdd Reviewed-by: Miguel Costa <[email protected]>
* Change source license to LicenseRef-Qt-Commercial or GPL-3.0-onlyAli Can Demiralp2024-02-281-1/+1
| | | | | | | | ... WITH Qt-GPL-exception. Fixes: QTVSADDINBUG-1179 Change-Id: I74fe451eec352af13436548cfd9a28f832fc0757 Reviewed-by: Karsten Heimrich <[email protected]>
* Cleanup and centralize Qt version handling codeKarsten Heimrich2024-01-291-84/+13
| | | | | | | | | | * Remove duplicated Qt version checking * Remove unused methods for Qt version checking * Unite Qt version handling in one place * Remove overloads taking a Registry hive Change-Id: I9873227f2d49eba84913398e03e7af1bbb3e46b7 Reviewed-by: Miguel Costa <[email protected]>
* Copy QtVsTools keys only once into the new QtProject registry treeKarsten Heimrich2024-01-221-0/+16
| | | | | | | | | | | | | | | | Set a flag to copy keys only once. This commit amends commits 79c929 and 201cea, addressing the following issues: Issue 1: * Versions are copied to the new registry tree on start-up. * Versions are deleted in the new tree from the Qt versions UI. * Versions are copied again to the new tree on the next start-up. Issue 2: * Overwriting QtVsTools settings that might have changed between the two trees on the next start-up. Change-Id: Ie2cf1b7049fa34d76d4016ebf0ed6cd572e4cdf1 Reviewed-by: Oliver Wolff <[email protected]> Reviewed-by: Miguel Costa <[email protected]>
* If version is null, Path.Combine() will throw an exceptionKarsten Heimrich2024-01-191-1/+2
| | | | | | | Change-Id: I4ea95cb09d76576f111d5210a7bfc6c30d90d10b Fixes: QTVSADDINBUG-1161 Reviewed-by: Ali Can Demiralp <[email protected]> Reviewed-by: Karsten Heimrich <[email protected]>
* Merge both getter methods to fetch Qt version informationKarsten Heimrich2024-01-161-29/+0
| | | | | | | | * 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 <[email protected]>
* Convert QtVersionManager to a fully static classKarsten Heimrich2024-01-161-18/+10
| | | | | | | | | * 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 <[email protected]>
* Refactor Qt version information retrieval for improved concurrencyKarsten Heimrich2024-01-161-37/+29
| | | | | | | | | | * 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 <[email protected]>
* Update license year from 2023 to 2024Ali Can Demiralp2024-01-091-1/+1
| | | | | Change-Id: I38700243f7ef55239b247945324e4e0a978b097f Reviewed-by: Miguel Costa <[email protected]>
* Adjust namespace of Utils class to match folder structureKarsten Heimrich2024-01-081-0/+1
| | | | | | Change-Id: I462c9cc4b96aaf354f77739da64202e2a7dc8af2 Reviewed-by: Ali Can Demiralp <[email protected]> Reviewed-by: Miguel Costa <[email protected]>
* 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 <[email protected]>
* Simplify method IsVersionAvailable() using LINQKarsten Heimrich2024-01-081-9/+2
| | | | | Change-Id: I175451714e12c0287de13dd97ca7409fb8dd3c3b Reviewed-by: Miguel Costa <[email protected]>
* Remove SaveProjectQtVersion() unused bool return typeKarsten Heimrich2024-01-081-4/+3
| | | | | Change-Id: I1ca404438918d904906401641ef7a855e9428a64 Reviewed-by: Miguel Costa <[email protected]>
* 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 <[email protected]>
* Shuffle around constant registry path valuesKarsten Heimrich2024-01-081-24/+17
| | | | | Change-Id: I674906eeea61bd36eec593a3b2f85ba46fce8664 Reviewed-by: Miguel Costa <[email protected]>
* Use verbatim string as regexp patternKarsten Heimrich2024-01-081-1/+1
| | | | | Change-Id: Ia77e06ed87293c75422aafaa37fe29abdb0742d9 Reviewed-by: Miguel Costa <[email protected]>
* Rename all QtProject{and related classes} to MsBuildProject{...}Karsten Heimrich2023-06-291-4/+4
| | | | | Change-Id: I7e730590938754892ae223c75bdb2d4611568055 Reviewed-by: Miguel Costa <[email protected]>
* Remove support for projects with custom build stepsKarsten Heimrich2023-06-221-75/+7
| | | | | | | | | | | The QtVersion class now supports only V3 of the project format. This enables us to remove support for projects with custom build steps. It is also not necessary anymore to check the project format before usinq QtProject, it is either a valid object and we know it is V3 and above, or it failed to create. Change-Id: I1cb0d8efe06cd8e2afe2fad8b9178c40c379ea7a Reviewed-by: Miguel Costa <[email protected]>
* Apply some cosmetical changes, no functional changes intendedKarsten Heimrich2023-06-221-8/+8
| | | | | | | | | | | | | * Fix line indent * Use var for built-in types * Use explicit modifiers style * Sort using directive * Remove unused using directive * Remove unused fields and functions * Make use of some new language features Change-Id: Icc7114698e44869cbce7f2836c61c8a033b0fb8e Reviewed-by: Miguel Costa <[email protected]>
* Package: Move generated class 'Version' into core libraryKarsten Heimrich2023-06-211-3/+3
| | | | | | | | | This is necessary to be able to move the Notification class later, cause Notification class in turn is used by some MsBuild classes that need to moved too. Change-Id: Ic1cdae347862f49c46909f3c7703a489e81421d5 Reviewed-by: Miguel Costa <[email protected]>
* Core library: Move Qt MSBuild related classesKarsten Heimrich2023-06-211-0/+2
| | | | | | | | | With this change, all QtProject/Qt MsBuild related classes are moved to a special directory. Only files that were previously in the core library are moved. Some code needed to be adapted. Change-Id: Ic664a13573ecbdf55014e57b5a4ea27e1813829f Reviewed-by: Miguel Costa <[email protected]>
* Refactor project format handlingKarsten Heimrich2023-06-211-2/+2
| | | | | | | | | * Introduce a class for handling the project format and versioning. * Refactor, rename and document the version numbers (above V3). Change-Id: Ied734c3377ebbe7915c87bd8a5ae1f7edcb11a4e Reviewed-by: Miguel Costa <[email protected]>
* Remove redundant codeKarsten Heimrich2023-04-201-1/+1
| | | | | Change-Id: I94cc72280815ed31809747b93032dd8768fd75ca Reviewed-by: Miguel Costa <[email protected]>
* Remove redundant type specificationKarsten Heimrich2023-04-201-1/+1
| | | | | Change-Id: I2fd01ab44923e301f4a9ae87445e8aaa9485cc83 Reviewed-by: Miguel Costa <[email protected]>
* Merge null/pattern checks into complex patternKarsten Heimrich2023-04-201-2/+2
| | | | | Change-Id: I971571b9df58c5619a2d9d629c61cc8f7761e99a Reviewed-by: Miguel Costa <[email protected]>
* Convert 'if-return' into 'return' statementKarsten Heimrich2023-04-201-14/+7
| | | | | Change-Id: Iba7b4d9afaf812c16e305c26f2b1870e974ee389 Reviewed-by: Miguel Costa <[email protected]>
* Add 'Instances' static classMiguel Costa2023-03-281-0/+5
| | | | | Change-Id: I606c0a615ca1f0757f30e48bafd10ed7c2dcd08e Reviewed-by: Karsten Heimrich <[email protected]>
* Rewrite if statement using '?:', '??' or '??=' exressionKarsten Heimrich2023-02-241-5/+2
| | | | | Change-Id: I7ba1c633156c14fa87bac4ef02ed72031f7dd9de Reviewed-by: Miguel Costa <[email protected]>
* Replace license headerMiguel Costa2023-02-231-27/+4
| | | | | Change-Id: I6e7667d0f6f1245b5b225e74120d289bf595423d Reviewed-by: Karsten Heimrich <[email protected]>
* Use index propertyKarsten Heimrich2023-02-231-5/+5
| | | | | Change-Id: Ic5deec80b05842a3d3810b77fe29388af6040a10 Reviewed-by: Miguel Costa <[email protected]>
* Remove GetQtDirFromQMakeProject() and releated codeKarsten Heimrich2023-02-231-17/+0
| | | | | | | | This function was only used to detect the Qt version of qmake only projects (qmake -tp vc). This is a not supported anymore. Change-Id: Ibbb510b037b2e687a4390814b8a43aab9385bfbc Reviewed-by: Miguel Costa <[email protected]>
* Remove remaining resource strings and releated classesKarsten Heimrich2023-02-231-1/+1
| | | | | Change-Id: I1f045d126060182694e7afed6b069b48ae6ab88d Reviewed-by: Miguel Costa <[email protected]>
* Dependent code cleanup after previous patch (now unused methods)Karsten Heimrich2023-02-231-15/+0
| | | | | Change-Id: I01e17543b39795a3a940b7a70a7ebd95d256d5c1 Reviewed-by: Miguel Costa <[email protected]>
* Remove unused codeKarsten Heimrich2023-02-231-6/+0
| | | | | Change-Id: Id7833ab7d60ba5dfae897b52755d7d2e4faaa479 Reviewed-by: Miguel Costa <[email protected]>
* Remove legacy read|write of Qt version to solution fileKarsten Heimrich2023-02-231-4/+0
| | | | | Change-Id: Ie937e5035f2a5575a1adfb285fe80f3f144fee39 Reviewed-by: Miguel Costa <[email protected]>
* Fix broken output in Qt version checksKarsten Heimrich2022-12-161-6/+7
| | | | | Change-Id: I2d0679269d9a0c9c90f70829e0c29d2ad585044b Reviewed-by: Miguel Costa <[email protected]>
* Improve Qt version pageKarsten Heimrich2022-11-211-0/+8
| | | | | | | | | | | | | * Fix changing version page in case of error. * Suppress error message if we try to remove a Qt version which does not (yet) exist in our registry hive. * Do Qt version validation a bit earlier so we can report errors in a timely manner and display a message box to the user. Fixes: QTVSADDINBUG-1058 Fixes: QTVSADDINBUG-1064 Change-Id: I0523ca8be9245157b9a0e65a5da056f7c79b1e04 Reviewed-by: Miguel Costa <[email protected]>
* Modernization: Replace casts with pattern variableKarsten Heimrich2022-10-041-14/+14
| | | | | | | | * Use pattern matching if applicable. * Some replacements are done using a switch statement. Change-Id: Iefffdb3815c34ae9d3ddd6d2c7735a43e6c15f2b Reviewed-by: Miguel Costa <[email protected]>
* Fix possible ArgumentException in case of empty QTDIRKarsten Heimrich2022-09-081-5/+5
| | | | | Change-Id: I793c2d00bca5e025b437acf6e3af910360cf3ed0 Reviewed-by: Miguel Costa <[email protected]>
* Fix function always returning null when using QTDIR env variableKarsten Heimrich2022-09-081-7/+1
| | | | | Change-Id: I72329a75a74c04af03dbc9fdf5cdda5b26b72516 Reviewed-by: Miguel Costa <[email protected]>
* Use DirectorySeparatorChar | AltDirectorySeparatorCharKarsten Heimrich2022-09-051-4/+6
| | | | | | | | * Also use {From|To}NativeSeparators where applicable. * Change StringComparison.Ordinal to OrdinalIgnoreCase. Change-Id: I5b12256734dccdaec2e9a7d46968445c2a4ee6eb Reviewed-by: Karsten Heimrich <[email protected]>