From 80e193df5591eadeef01bf5cd7f3685916ad660e Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 30 Nov 2016 14:58:25 +0100 Subject: Fix VS Qt version matching We must not compare the full compiler versions, but only the major and minor versions. This amends 26c5cbc1. Change-Id: I8e48047ce70ba237fdbb1a8593f2469b2eb7d60a Reviewed-by: Christian Kandeler --- src/app/qbs-setup-qt/setupqt.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/qbs-setup-qt/setupqt.cpp b/src/app/qbs-setup-qt/setupqt.cpp index 9314c69aa..25dd233be 100644 --- a/src/app/qbs-setup-qt/setupqt.cpp +++ b/src/app/qbs-setup-qt/setupqt.cpp @@ -473,10 +473,12 @@ static Match compatibility(const QtEnvironment &env, const Profile &toolchainPro if (msvcCompilerVersion.isValid()) { // We want to know for sure that MSVC compiler versions match, // because it's especially important for this toolchain - if (msvcCompilerVersion != Version::fromString( - toolchainProfile.value(QLatin1String("cpp.compilerVersion")).toString())) { + const Version fullCompilerVersion = Version::fromString( + toolchainProfile.value(QLatin1String("cpp.compilerVersion")).toString()); + const Version shortCompilerVersion = Version(fullCompilerVersion.majorVersion(), + fullCompilerVersion.minorVersion()); + if (msvcCompilerVersion != shortCompilerVersion) return MatchNone; - } } return match; -- cgit v1.2.3