From ca47896204482bf4a6979e3838bf7f09f61cebeb Mon Sep 17 00:00:00 2001
From: giy <giy@omp-system.ru>
Date: Fri, 02 Sep 2022 14:16:56 +0300
Subject: [PATCH] Обновление до версии 2.9.0
---
QtVsTools.Core/VersionInformation.cs | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/QtVsTools.Core/VersionInformation.cs b/QtVsTools.Core/VersionInformation.cs
index fd8cc1a..12d6c81 100644
--- a/QtVsTools.Core/VersionInformation.cs
+++ b/QtVsTools.Core/VersionInformation.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -34,6 +34,7 @@
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
+using Microsoft.VisualStudio.Shell;
namespace QtVsTools.Core
{
@@ -42,11 +43,10 @@
{
//fields
public string name;
- public string qtDir;
+ public readonly string qtDir;
public uint qtMajor; // X in version x.y.z
public uint qtMinor; // Y in version x.y.z
public uint qtPatch; // Z in version x.y.z
- public bool qt5Version = true;
private QtConfig qtConfig;
private QMakeConf qmakeConf;
private string vsPlatformName;
@@ -79,18 +79,18 @@
_cache.Clear();
}
- Dictionary<string, bool> _IsModuleAvailable;
+ readonly Dictionary<string, bool> _IsModuleAvailable;
public bool IsModuleAvailable(string module)
{
return _IsModuleAvailable?[module] ?? false;
}
- public string VC_MinimumVisualStudioVersion { get; private set; }
- public string VC_ApplicationTypeRevision { get; private set; }
- public string VC_WindowsTargetPlatformMinVersion { get; private set; }
- public string VC_WindowsTargetPlatformVersion { get; private set; }
- public string VC_Link_TargetMachine { get; private set; }
- public string VC_PlatformToolset { get; private set; }
+ public string VC_MinimumVisualStudioVersion { get; }
+ public string VC_ApplicationTypeRevision { get; }
+ public string VC_WindowsTargetPlatformMinVersion { get; }
+ public string VC_WindowsTargetPlatformVersion { get; }
+ public string VC_Link_TargetMachine { get; }
+ private string VC_PlatformToolset { get; }
private VersionInformation(string qtDirIn)
{
@@ -128,7 +128,6 @@
qtMinor = (version >> 8) & 0xFF;
qtPatch = version & 0xFF;
}
- qt5Version = (qtMajor == 5);
try {
QtInstallDocs = qmakeQuery["QT_INSTALL_DOCS"];
@@ -143,7 +142,7 @@
var tempProData = new StringBuilder();
tempProData.AppendLine("SOURCES = main.cpp");
- var modules = QtModules.Instance.GetAvailableModules()
+ var modules = QtModules.Instance.GetAvailableModules(qtMajor)
.Where((QtModule mi) => mi.Selectable);
foreach (QtModule mi in modules) {
@@ -194,7 +193,7 @@
public string QtInstallDocs
{
- get; private set;
+ get;
}
public string QMakeSpecDirectory
--
Gitblit v1.9.1