summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2016-11-10 09:12:38 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2016-11-11 07:44:22 +0000
commit6ad1012758af5af7d6313c3e76abb9c06e35547f (patch)
treeaab05295e755426c7ba47c1158a298953de931f1 /qmake
parent19a16a822927a1b09a6a2b88af9cb24538a5f721 (diff)
Remove superfluous calls to which_dotnet_version
On the way to get rid of this function. Have one place to determine the VS version instead of calling this function over and over again (even though all calls but the first are cheap). Change-Id: Ic42a65df5a9bbe289f4813e4db85000dba15e672 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 9b5c213713..3558f94098 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -611,7 +611,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
return;
}
- switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
+ switch (vcProject.Configuration.CompilerVersion) {
case NET2015:
t << _slnHeader140;
break;
@@ -638,7 +638,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
break;
default:
t << _slnHeader70;
- warn_msg(WarnLogic, "Generator: MSVC.NET: Unknown version (%d) of MSVC detected for .sln", which_dotnet_version());
+ warn_msg(WarnLogic, "Generator: MSVC.NET: Unknown version (%d) of MSVC detected for .sln",
+ vcProject.Configuration.CompilerVersion);
break;
}
@@ -932,7 +933,7 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString();
- switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
+ switch (vcProject.Configuration.CompilerVersion) {
case NET2015:
vcProject.Version = "14.00";
break;
@@ -961,7 +962,7 @@ void VcprojGenerator::initProject()
break;
default:
vcProject.Version = "7.00";
- warn_msg(WarnLogic, "Generator: MSVC.NET: Unknown version (%d) of MSVC detected for .vcproj", which_dotnet_version());
+ warn_msg(WarnLogic, "Generator: MSVC.NET: Unknown version (%d) of MSVC detected for .vcproj", vcProject.Configuration.CompilerVersion);
break;
}