diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-12-02 13:49:13 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-12-02 16:46:21 +0000 |
commit | cce60627901fbc435a5c35e0c458ad87435262f4 (patch) | |
tree | fbf592db26f9a4bebe33c95a73d91898fce9f1bf /QtVsTools.Core | |
parent | 0aa6297cba99b7a2a525672a6faca1f99d0339e6 (diff) |
Enable more code that was ifdef'ed out for VS2022
Change-Id: I698043760226ec4d8140e6a42e4d5ea83f7a48d7
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Diffstat (limited to 'QtVsTools.Core')
-rw-r--r-- | QtVsTools.Core/HelperFunctions.cs | 2 | ||||
-rw-r--r-- | QtVsTools.Core/ProjectImporter.cs | 2 | ||||
-rw-r--r-- | QtVsTools.Core/QtProject.cs | 4 | ||||
-rw-r--r-- | QtVsTools.Core/QtVersionManager.cs | 2 |
4 files changed, 2 insertions, 8 deletions
diff --git a/QtVsTools.Core/HelperFunctions.cs b/QtVsTools.Core/HelperFunctions.cs index 627c86af..c7aff0e8 100644 --- a/QtVsTools.Core/HelperFunctions.cs +++ b/QtVsTools.Core/HelperFunctions.cs @@ -1669,7 +1669,7 @@ namespace QtVsTools.Core public static string GetWindows10SDKVersion() { -#if VS2019 +#if VS2019 || VS2022 // In Visual Studio 2019: WindowsTargetPlatformVersion=10.0 // will be treated as "use latest installed Windows 10 SDK". // https://developercommunity.visualstudio.com/comments/407752/view.html diff --git a/QtVsTools.Core/ProjectImporter.cs b/QtVsTools.Core/ProjectImporter.cs index d2dbb9af..dc584166 100644 --- a/QtVsTools.Core/ProjectImporter.cs +++ b/QtVsTools.Core/ProjectImporter.cs @@ -214,13 +214,11 @@ namespace QtVsTools.Core ok = xmlProject.ConvertCustomBuildToQtMsBuild(); if (ok) ok = xmlProject.EnableMultiProcessorCompilation(); -#if (VS2019 || VS2017) if (ok) { string versionWin10SDK = HelperFunctions.GetWindows10SDKVersion(); if (!string.IsNullOrEmpty(versionWin10SDK)) ok = xmlProject.SetDefaultWindowsSDKVersion(versionWin10SDK); } -#endif if (ok) ok = xmlProject.UpdateProjectFormatVersion(); diff --git a/QtVsTools.Core/QtProject.cs b/QtVsTools.Core/QtProject.cs index f19f7252..344da799 100644 --- a/QtVsTools.Core/QtProject.cs +++ b/QtVsTools.Core/QtProject.cs @@ -399,7 +399,6 @@ namespace QtVsTools.Core foreach (VCConfiguration config in (IVCCollection)vcPro.Configurations) { var info = QtModules.Instance.ModuleInformation(module); -#if VS2017 || VS2019 if (FormatVersion >= Resources.qtMinFormatVersion_Settings) { var config3 = config as VCConfiguration3; if (config3 == null) @@ -418,7 +417,6 @@ namespace QtVsTools.Core // required by modules are set by Qt/MSBuild. continue; } -#endif var compiler = CompilerToolWrapper.Create(config); var linker = (VCLinkerTool)((IVCCollection)config.Tools).Item("VCLinkerTool"); @@ -2002,7 +2000,7 @@ namespace QtVsTools.Core if (!vfilt.CanAddFilter(subfilterName)) throw new QtVSException(SR.GetString("QtProject_CannotAddFilter", filter.Name)); -#if !(VS2017 || VS2019) +#if !(VS2017 || VS2019 || VS2022) // TODO: Enable once the freeze gets fixed in VS. vfilt = (VCFilter)vfilt.AddFilter(subfilterName); vfilt.Filter = "cpp;moc"; diff --git a/QtVsTools.Core/QtVersionManager.cs b/QtVsTools.Core/QtVersionManager.cs index 319805e2..44797989 100644 --- a/QtVsTools.Core/QtVersionManager.cs +++ b/QtVsTools.Core/QtVersionManager.cs @@ -349,12 +349,10 @@ namespace QtVsTools.Core var vcPro = project.Object as VCProject; if (vcPro == null) return false; -#if VS2017 || VS2019 foreach (VCConfiguration3 config in (IVCCollection)vcPro.Configurations) { config.SetPropertyValue(Resources.projLabelQtSettings, true, "QtInstall", version); } -#endif return true; } var key = "Qt5Version " + platform; |