aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2018-05-24 10:36:43 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2018-05-24 10:54:03 +0000
commite59065e81c69b7c9fae2dfb73c6575dff69fb680 (patch)
treeff74e737539f0be07593208f243f1fb0d3062806 /src/app
parent85b28f9a057772db05c002b528655c1c093d0f50 (diff)
Move MSVC-related functions to qtprofilesetup lib
This will avoid code duplication in the next commit. Change-Id: I90d99860dce04bf56c81d4f363aa6e5bafe1224c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qbs-setup-qt/setupqt.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/app/qbs-setup-qt/setupqt.cpp b/src/app/qbs-setup-qt/setupqt.cpp
index 7f9d98d81..d8bc6ab56 100644
--- a/src/app/qbs-setup-qt/setupqt.cpp
+++ b/src/app/qbs-setup-qt/setupqt.cpp
@@ -40,6 +40,7 @@
#include "setupqt.h"
#include "../shared/logging/consolelogger.h"
+#include <qtmsvctools.h>
#include <qtprofilesetup.h>
#include <logging/translator.h>
#include <tools/architectures.h>
@@ -188,41 +189,6 @@ static QString pathQueryValue(const QueryMap &queryMap, const QByteArray &key)
return QDir::fromNativeSeparators(QString::fromLocal8Bit(queryMap.value(key)));
}
-static const QString msvcPrefix = QLatin1String("win32-msvc");
-
-static bool isMsvcQt(const QtEnvironment &env)
-{
- return env.mkspecName.startsWith(msvcPrefix);
-}
-
-static Version msvcCompilerVersionForYear(int year)
-{
- switch (year)
- {
- case 2005:
- return Version(14);
- case 2008:
- return Version(15);
- case 2010:
- return Version(16);
- case 2012:
- return Version(17);
- case 2013:
- return Version(18);
- case 2015:
- return Version(19);
- case 2017:
- return Version(19, 1);
- default:
- return Version();
- }
-}
-
-static Version msvcCompilerVersionFromMkspecName(const QString &mkspecName)
-{
- return msvcCompilerVersionForYear(mkspecName.mid(msvcPrefix.size()).toInt());
-}
-
QtEnvironment SetupQt::fetchEnvironment(const QString &qmakePath)
{
QtEnvironment qtEnvironment;