aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.Core
Commit message (Collapse)AuthorAgeFilesLines
* Remove RefreshVersionNames(), cause the value stored is not used at allKarsten Heimrich2022-03-161-16/+0
| | | | | Change-Id: Ia2b48c4e29b72e1324592bb1a51af14c403572c0 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Add LazyFactory classMiguel Costa2022-03-013-3/+62
| | | | | | | | This class eliminates the need for auxiliary variables (prefixed with '_') associated to lazy-initialized properties. Change-Id: Ie2899151f4c70a3532923dcacb1debcd01509c97 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Apply uniform guidelines to 'using' directivesMiguel Costa2022-02-2219-48/+54
| | | | | Change-Id: If92cf095e20c4bc8b9bc9fe04a40233a2c602973 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix package startup (remove ThreadHelper.ThrowIfNotOnUIThread())Karsten Heimrich2022-02-221-27/+0
| | | | | | | | | Some of the methods in QtVersionManager were still expected run on the UI thread, but that wasn't necessary and prevented the package from loading properly. Change-Id: Ia67ce4f28a971e154a0abdac1777a976e1cb0fae Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove some more ThreadHelper.ThrowIfNotOnUIThread()Karsten Heimrich2022-02-2212-116/+96
| | | | | | | | | | | Also: * Moved remaining ThrowIfNotOnUIThread to the top of functions * Added 'using Microsoft.VisualStudio.Shell;' and removed full namespace prefix from calls to ThrowIfNotOnUIThread * Minor adjustments (white-space, commented/forgotten debug call, etc.) Change-Id: Id76d809d267c250580d5cc1c774f857c7bf612ab Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Avoid potential deadlocksMiguel Costa2022-02-189-56/+25
| | | | | | | | | | | | Multi-threaded access to objects bound to the UI thread can potentially lead to deadlocks. All functions that participate in a call chain resulting in the use of objects bound to the UI thread will now call ThreadHelper.ThrowIfNotOnUIThread(). Where applicable, multi-threaded functions have been rewritten to ensure that UI-bound objects are only accessed from the UI thread. Change-Id: I555bd93c44ae568a9202ca6624b043994d18510a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Refactor OutputWindowPane handlingKarsten Heimrich2022-02-173-86/+216
| | | | | | | | | | | Refactor access to the OutputWindowPane into a separate class and enable async get/write of the output window pane. Remove some of the previously introduced function calls to ThreadHelper.ThrowIfNotOnUIThread(); as they are not necessary in the VSIX loading code path. Change-Id: I2c7f5f84ec556526fe78612d981f28210c545f45 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Inline variable declarationKarsten Heimrich2022-02-109-66/+37
| | | | | Change-Id: I19a55a53173da4e6e5aeea5f40790b1dea6346ec Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Use pattern matchingKarsten Heimrich2022-02-094-57/+36
| | | | | Change-Id: I49c5c7988a08affc42455355926cc0e442e0fe5f Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Sort modifierKarsten Heimrich2022-02-094-24/+24
| | | | | Change-Id: I546409ef6d88571e7fe9299bef858e431085fea2 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Make property privateKarsten Heimrich2022-02-094-8/+11
| | | | | Change-Id: I0680fcef9877e2d24a82eb5e9183173837fc3be3 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Make property get onlyKarsten Heimrich2022-02-098-22/+20
| | | | | Change-Id: I16f9ceec8ea96482f880b6b73e21f4523f6b845b Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Make field privateKarsten Heimrich2022-02-092-9/+9
| | | | | Change-Id: I075e1be45c378746b8bd795a24dac7df6ed1737f Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Convert to auto propertyKarsten Heimrich2022-02-095-148/+28
| | | | | Change-Id: I1559ca11eaafc4ae19d3be096fbf2d3faf503538 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Mark members readonlyKarsten Heimrich2022-02-0919-60/+58
| | | | | Change-Id: I63f4a890400a37319eec064ec0fbd7bf6d6fb4e4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix warning: Add ThreadHelper.ThrowIfNotOnUIThread();Karsten Heimrich2022-02-0916-41/+425
| | | | | Change-Id: I8e7cc3a16eb5b303823ea5b1c85e04f5ce85947b Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Add .vsconfig files, update package refs, use conditional groupingKarsten Heimrich2022-02-091-18/+25
| | | | | | | | | | | * Update package references to the latest stable versions. * Add .vsconf files containing the minimum build requirements. * Nuget does not support ItemGroup conditions, though they can be emulated using Choose/When. This cleanly solves the issue of having to add dummy packages for certain VS versions. Change-Id: I34c58fe8d48b742e189b1843e5b06efaa4f983d9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Cleanup unused project ReferencesKarsten Heimrich2022-02-021-1/+1
| | | | | Change-Id: I7ec8f5c77abd3f9ec4b9ee11283513103065efd6 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix Vs2017 build, amends patch 4b76a7 and d8c550Karsten Heimrich2022-02-021-0/+31
| | | | | Change-Id: Iff98da39a1496b2cf89bd109359af9d3715cd0b5 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix using directive is not requiredKarsten Heimrich2022-01-289-19/+0
| | | | | Change-Id: I8c0766b66b49206339d048f28d02caf9c10f7fb0 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix local variable is never usedKarsten Heimrich2022-01-283-18/+0
| | | | | Change-Id: Ief355368fed193e437ee4881dbb1373e21f62a95 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix method or member is unusedKarsten Heimrich2022-01-2810-608/+3
| | | | | Change-Id: I93715c19bbdf2c0152ecc622d5eba2c5f8182fb5 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix copy and paste errorKarsten Heimrich2022-01-281-2/+2
| | | | | Change-Id: If24f9ace651b30ea1acc5a5d07ad72e99051069e Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix expression is always trueKarsten Heimrich2022-01-281-1/+1
| | | | | Change-Id: I526366e04df48ea3618a3eeb64b1eed6889eeb5a Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove old translation file related codeKarsten Heimrich2022-01-202-34/+1
| | | | | Change-Id: Ib31d710a08b65b8b17a8bb61f65c8be1fccf7414 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Make Visual Studio copy the resource file, remove dead codeKarsten Heimrich2022-01-181-31/+0
| | | | | Change-Id: Id0c2109568b7fb19c08852d2719a0af276cc27a0 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove now dead code used in the old class/widget wizardsKarsten Heimrich2022-01-142-170/+2
| | | | | Change-Id: I6709ff4a14b25b64b60a9e7c58ac43d49ef0f700 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix error opening .pro with Qt6Miguel Costa2022-01-032-3/+1
| | | | | | Fixes: QTVSADDINBUG-970 Change-Id: I8ddb81f10c20eed72e8f3bf29fa39ecf68e87d07 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Print debug message with path to clMiguel Costa2021-12-171-0/+8
| | | | | | | | | | | Before starting qmake, the vcvars batch file must be called to obtain the path to the msvc compiler. Added some output messages to debug situations where qmake errors out with a 'cl not found' message. Task-number: QTVSADDINBUG-915 Change-Id: I392c2ff9a90c4fa4b6e081ee9c728a19e1808129 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix "Finish" button always disabled in Qt Class WizardKarsten Heimrich2021-12-171-19/+0
| | | | | | | | | * Calm down som warnings in VS2022. * Make the wizard message more generic. Fixes: QTVSADDINBUG-930 Change-Id: I821706fb89a649079baa72edd7fd57a5273529fb Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Update and fix contextual helpKarsten Heimrich2021-12-171-0/+2
| | | | | | | | | | * Fix null reference exception QtVsTools.Core.QtVersionManager.GetVersionInfo(...) can return null if one presses ALT+F1 and no Qt version is registered. * Update URL builder code to take the Qt major version into account. Change-Id: I9239af3e87e2ccabee1f629c9c69a0cbd63e35de Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Match toolset of new projects to VS versionMiguel Costa2021-12-161-6/+4
| | | | | | | | | The platform toolset for new Qt projects will now reflect the version of Visual Studio where the extension is running. Previously, the toolset of new projects matched the build configuration of the Qt version. Change-Id: I3ef8dbd933469861168e20cba43fdb47705d13a2 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove unnecessary loading and translation of Qt module namesKarsten Heimrich2021-12-152-2/+0
| | | | | | | | | Since we are in english only anyway, loading and translating Qt module names makes no sense. Especially while the package is loading. Completely remove the module name resource entries. Change-Id: I593e87ea534260d18e471fda012d186d7630a6be Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Rename ModuleId to Id where applicableKarsten Heimrich2021-12-074-16/+16
| | | | | Change-Id: Id3791d39b5e216bc2564499a6203029db245cf01 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Rename some methods containing *ModuleInformation to just *ModulesKarsten Heimrich2021-12-075-58/+58
| | | | | Change-Id: I8e7b6c61a73a3124eb1a701c0b90193e0d03cc11 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Rename QtModuleInfo to QtModule, following qtmodules.xml declarationKarsten Heimrich2021-12-075-17/+17
| | | | | Change-Id: I29eacbd177239ee57e7367290f95675483390273 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove QtModule enumerationKarsten Heimrich2021-12-075-106/+13
| | | | | | | | The ID's are now calculated by reading it from the qtmodules.xml. Remove the global enumeration and use int directly instead. Change-Id: Ic8a083e5e9d115d86a0c905191da405ff3c2511c Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Enable more code that was ifdef'ed out for VS2022Karsten Heimrich2021-12-024-8/+2
| | | | | Change-Id: I698043760226ec4d8140e6a42e4d5ea83f7a48d7 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove now unused Qt3Project template typeKarsten Heimrich2021-12-021-3/+2
| | | | | Change-Id: I0e1ae1e4e8ed0dd645af1e951c38b92838cfb4f3 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Cleanup and update Resources.resx filesKarsten Heimrich2021-12-021-27/+3
| | | | | Change-Id: I27a27ce304d5bf46614efde4c70ee6db46e16103 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Cleanup and merge remaining registry settings handlingKarsten Heimrich2021-12-022-46/+0
| | | | | | | | | Most registry options are gone except for the TextMate language path. Get rid of the separate classes and merge everything into the single spot of usage. Change-Id: I9a63fdd38a18557b8bcc28103491d0ce55f78160 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix Object Reference Not Set to an instance of an objectKarsten Heimrich2021-12-022-9/+18
| | | | | | | | | | This can happen if you try to change a solution's Qt version to the "Default version" and there is no Qt version registered at all. Fixes: QTVSADDINBUG-628 Task-number: QTVSADDINBUG-431 Change-Id: I988b493160b38a0a167c5b9b81663ad251a3a75e Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Final run to format the code as specified int the .editorconfig fileKarsten Heimrich2021-12-0215-161/+161
| | | | | | | Mostly space changes related to casting. No functional change noticed. Change-Id: I4b3b936bc93c1b396e26dcd2370eff6f505f58d9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Format switch-case according to the .editorconfig ruleKarsten Heimrich2021-12-025-223/+220
| | | | | Change-Id: I87cf1f2058fe53b940d00e82299ba414823e17c6 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix QML files are not updated with lupdateKarsten Heimrich2021-11-292-1/+11
| | | | | | Fixes: QTVSADDINBUG-340 Change-Id: I83acb1854a3155a36707bacdb30f962680e137b4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove some dead codeKarsten Heimrich2021-11-297-205/+0
| | | | | Change-Id: I9134f34ed14f1fa6cb44a89473bc76fc11ac728e Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Remove some more traces of VS2013 and VS2015Karsten Heimrich2021-11-175-34/+4
| | | | | Change-Id: I81f1bd3df48c8696d04f1619df6b8cf0067ecd24 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix PackageReference version mismatchMiguel Costa2021-11-161-1/+0
| | | | | | | | Fixed an issue where some NuGet packages had a version incompatible with that of other packages, leading to run-time errors. Change-Id: I65790d601fa7092248c61f84fe0b1a2a8447e287 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* refactoring: Add support for VS 2022Miguel Costa2021-11-164-3/+12
| | | | | | | | This patch includes changes required to support Visual Studio 2022. Fixes: QTVSADDINBUG-920 Change-Id: I2494724a660535c7a1868e60b3981e46c109570c Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* refactoring: Rework layout of project filesMiguel Costa2021-11-161-41/+84
| | | | | | | | | | | | | | | | | This change includes the following: * Support for Visual Studio 2022. * Visual Studio SDK referenced through NuGet packages instead of referencing individual assemblies. * The layout of project files has been unified; previously, there was a great disparity of project formats, making maintenance difficult. * Updated references to solution projects, with respect to the move from 'src' to the solution root. NOTE: this change breaks the build; it should only be applied together with subsequent refactoring changes. Change-Id: I1fe653617f1fcdee537c3ae3f643df19c121ea69 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>