aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.Core/QtVersionManager.cs
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix opening V200 project settings dialogKarsten Heimrich2022-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | QtMenu.cs: * Do not use the default Qt version if we cannot get the projects Qt version, cause it might be completely off in version (Qt5 vs. Qt6). Let the dialog handle the Qt version. FormProjectQtSettings.cs: * If we cannot get the Qt version, do not try to populate the modules list. Do not use the default Qt version. * If we cannot get the Qt version info, do not try to populate the modules list. Fixes null reference access while trying to access the version information's Qt major version. * Automatically update the modules list if we change the Qt version. * Merge constructor and InitModules() code. * Remove unnecessary Text property updates, add them directly to the designer file. * Override ProcessDialogKey() to be able to press Escape on an open e.g. Combobox to close it instead of closing the dialog. Change-Id: I86c50010a54bd3fb3701b735d69d9331428b1c83 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Split/ rewrite and improve performance of HasInvalidVersions()Karsten Heimrich2022-08-111-63/+61
| | | | | | | | | | | * Actually check for valid versions only. * Delay reading and parsing of qtconfig.pri unitl necessary. * Slim down reading the default version, as it makes no sense to check for its existence again in GetDefaultVersion() while we want to verify if it is valid (we will find out anyway). Change-Id: I449bdc3907699b464b80e10661bebcf62300af27 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Merge code that checks for qmake existenceKarsten Heimrich2022-08-111-11/+5
| | | | | Change-Id: I58357f04081555491b2f3f9de15551f98cd7621d Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Use StringComparison.OrdinalIgnoreCase to compare pathsKarsten Heimrich2022-07-261-2/+1
| | | | | | | Follows the "Best practices for comparing strings in .NET". Change-Id: I904bb5f1c4567fa6167c20cb716a4b4435a3a35c Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Hide the legacy "Set Solution's Qt Version" menu for new projectsKarsten Heimrich2022-04-051-32/+4
| | | | | | | * Move some code into Legacy namespace Change-Id: I7c04fd3a7fffcc5d766b98976b533230105952ce Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* 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>
* Apply uniform guidelines to 'using' directivesMiguel Costa2022-02-221-3/+3
| | | | | 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-221-10/+10
| | | | | | | | | | | 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-181-10/+8
| | | | | | | | | | | | 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>
* Sort modifierKarsten Heimrich2022-02-091-1/+1
| | | | | Change-Id: I546409ef6d88571e7fe9299bef858e431085fea2 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Mark members readonlyKarsten Heimrich2022-02-091-5/+4
| | | | | Change-Id: I63f4a890400a37319eec064ec0fbd7bf6d6fb4e4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix warning: Add ThreadHelper.ThrowIfNotOnUIThread();Karsten Heimrich2022-02-091-2/+48
| | | | | Change-Id: I8e7cc3a16eb5b303823ea5b1c85e04f5ce85947b Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix using directive is not requiredKarsten Heimrich2022-01-281-3/+0
| | | | | Change-Id: I8c0766b66b49206339d048f28d02caf9c10f7fb0 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix method or member is unusedKarsten Heimrich2022-01-281-6/+0
| | | | | Change-Id: I93715c19bbdf2c0152ecc622d5eba2c5f8182fb5 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Enable more code that was ifdef'ed out for VS2022Karsten Heimrich2021-12-021-2/+0
| | | | | Change-Id: I698043760226ec4d8140e6a42e4d5ea83f7a48d7 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Final run to format the code as specified int the .editorconfig fileKarsten Heimrich2021-12-021-5/+5
| | | | | | | Mostly space changes related to casting. No functional change noticed. Change-Id: I4b3b936bc93c1b396e26dcd2370eff6f505f58d9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* refactoring: Reorganize project filesMiguel Costa2021-11-161-0/+560
- Moved project files from the 'src' folder into the root 'vstools'. - Renamed some projects: * QtVsTools -> QtVsTools.Package * qtwizard -> QtVsTools.Wizards * Project template projects -> QtTemplate.Project.* * Item template projects -> QtTemplate.Item.* - Moved QtVsTools.Package source files to a sub-folder named 'Package'. NOTE: this change breaks the build; it should only be applied together with subsequent refactoring changes. Change-Id: Ib7b70c350d8e9f068a023b0250d6b490b17d1687 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>