aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.Core
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2021-11-16 16:04:31 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2021-11-17 13:09:40 +0000
commita417c3c419979eec8abd88c8109664c8761a8d96 (patch)
treecceaa832ef1d5fe628a27a9da59112f433f580e5 /QtVsTools.Core
parentdb015a85a1a4009904b6b97574d5b1eeaef298f7 (diff)
Remove some more traces of VS2013 and VS2015
Change-Id: I81f1bd3df48c8696d04f1619df6b8cf0067ecd24 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Diffstat (limited to 'QtVsTools.Core')
-rw-r--r--QtVsTools.Core/BuildConfig.cs4
-rw-r--r--QtVsTools.Core/HelperFunctions.cs22
-rw-r--r--QtVsTools.Core/ProjectImporter.cs2
-rw-r--r--QtVsTools.Core/Resources.cs6
-rw-r--r--QtVsTools.Core/VisualStudio/VsServiceProvider.cs4
5 files changed, 4 insertions, 34 deletions
diff --git a/QtVsTools.Core/BuildConfig.cs b/QtVsTools.Core/BuildConfig.cs
index 47d438f8..fe6eacdd 100644
--- a/QtVsTools.Core/BuildConfig.cs
+++ b/QtVsTools.Core/BuildConfig.cs
@@ -37,9 +37,7 @@ namespace QtVsTools.Core
public static string PlatformToolset(string version)
{
// TODO: Find a proper way to return the PlatformToolset version.
-#if (VS2013 || VS2015)
- return version.Replace(".", string.Empty);
-#elif VS2017
+#if VS2017
return "141";
#elif VS2019
return "142";
diff --git a/QtVsTools.Core/HelperFunctions.cs b/QtVsTools.Core/HelperFunctions.cs
index 865d7436..64acd46b 100644
--- a/QtVsTools.Core/HelperFunctions.cs
+++ b/QtVsTools.Core/HelperFunctions.cs
@@ -1702,14 +1702,6 @@ namespace QtVsTools.Core
if (string.IsNullOrEmpty(vsPath))
return "";
string vcPath = Path.Combine(vsPath, "VC");
-#elif VS2015
- string vcPath = GetRegistrySoftwareString(@"Microsoft\VisualStudio\SxS\VC7", "14.0");
- if (string.IsNullOrEmpty(vcPath))
- return ""; //could not get registry key
-#elif VS2013
- string vcPath = GetRegistrySoftwareString(@"Microsoft\VisualStudio\SxS\VC7", "12.0");
- if (string.IsNullOrEmpty(vcPath))
- return ""; //could not get registry key
#endif
return vcPath;
}
@@ -1733,7 +1725,6 @@ namespace QtVsTools.Core
return false;
string comspecPath = Environment.GetEnvironmentVariable("COMSPEC");
-#if (VS2017 || VS2019 || VS2022)
string vcVarsCmd = "";
string vcVarsArg = "";
if (isOS64Bit && isQt64Bit)
@@ -1744,18 +1735,7 @@ namespace QtVsTools.Core
vcVarsCmd = Path.Combine(vcPath, @"Auxiliary\Build\vcvarsamd64_x86.bat");
else if (!isOS64Bit && isQt64Bit)
vcVarsCmd = Path.Combine(vcPath, @"Auxiliary\Build\vcvarsx86_amd64.bat");
-#elif VS2015 || VS2013
- string vcVarsCmd = Path.Combine(vcPath, "vcvarsall.bat");
- string vcVarsArg = "";
- if (isOS64Bit && isQt64Bit)
- vcVarsArg = "amd64";
- else if (!isOS64Bit && !isQt64Bit)
- vcVarsArg = "x86";
- else if (isOS64Bit && !isQt64Bit)
- vcVarsArg = "amd64_x86";
- else if (!isOS64Bit && isQt64Bit)
- vcVarsArg = "x86_amd64";
-#endif
+
const string markSTX = ":@:@:@";
const string markEOL = ":#:#:#";
string command =
diff --git a/QtVsTools.Core/ProjectImporter.cs b/QtVsTools.Core/ProjectImporter.cs
index c2fbd925..609a9558 100644
--- a/QtVsTools.Core/ProjectImporter.cs
+++ b/QtVsTools.Core/ProjectImporter.cs
@@ -214,7 +214,7 @@ namespace QtVsTools.Core
ok = xmlProject.ConvertCustomBuildToQtMsBuild();
if (ok)
ok = xmlProject.EnableMultiProcessorCompilation();
-#if (VS2019 || VS2017 || VS2015)
+#if (VS2019 || VS2017)
if (ok) {
string versionWin10SDK = HelperFunctions.GetWindows10SDKVersion();
if (!string.IsNullOrEmpty(versionWin10SDK))
diff --git a/QtVsTools.Core/Resources.cs b/QtVsTools.Core/Resources.cs
index 00d9fabd..9ada4cf3 100644
--- a/QtVsTools.Core/Resources.cs
+++ b/QtVsTools.Core/Resources.cs
@@ -131,11 +131,7 @@ namespace QtVsTools.Core
public const string registryRootPath = "Digia";
-#if VS2013
- public const string registryPackagePath = registryRootPath + "\\Qt5VS2013";
-#elif VS2015
- public const string registryPackagePath = registryRootPath + "\\Qt5VS2015";
-#elif (VS2017 || VS2019 || VS2022)
+#if (VS2017 || VS2019 || VS2022)
public const string registryPackagePath = registryRootPath + "\\Qt5VS2017";
#else
#error Unknown Visual Studio version!
diff --git a/QtVsTools.Core/VisualStudio/VsServiceProvider.cs b/QtVsTools.Core/VisualStudio/VsServiceProvider.cs
index d8a24c01..89af0038 100644
--- a/QtVsTools.Core/VisualStudio/VsServiceProvider.cs
+++ b/QtVsTools.Core/VisualStudio/VsServiceProvider.cs
@@ -38,9 +38,7 @@ namespace QtVsTools.VisualStudio
public interface IVsServiceProvider
{
I GetService<T, I>() where T : class where I : class;
-#if !VS2013
Task<I> GetServiceAsync<T, I>() where T : class where I : class;
-#endif
}
public static class VsServiceProvider
@@ -72,7 +70,6 @@ namespace QtVsTools.VisualStudio
return serviceInterface;
}
-#if !VS2013
public static async Task<I> GetServiceAsync<I>()
where I : class
{
@@ -94,6 +91,5 @@ namespace QtVsTools.VisualStudio
services.TryAdd(new ServiceType(typeof(T), typeof(I)), serviceInterface);
return serviceInterface;
}
-#endif
}
}