Commit 58827feb authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

Fixes: Build on msvc

RevBy:    Found by me.
parent a87297bf
......@@ -963,7 +963,7 @@ void QtVersion::updateVersionInfo() const
QString line = stream.readLine();
int index = line.indexOf(":");
if (index != -1)
m_versionInfo.insert(line.left(index), line.mid(index+1));
m_versionInfo.insert(line.left(index), QDir::fromNativeSeparators(line.mid(index+1)));
}
}
......@@ -1035,6 +1035,7 @@ void QtVersion::updateMkSpec() const
mkspec = mkspec.mid(QString("$$QT_BUILD_TREE/mkspecs/").length());
else if (mkspec.startsWith("$$QT_BUILD_TREE\\mkspecs\\"))
mkspec = mkspec.mid(QString("$$QT_BUILD_TREE\\mkspecs\\").length());
mkspec = QDir::fromNativeSeparators(mkspec);
}
break;
}
......@@ -1097,10 +1098,11 @@ void QtVersion::updateMkSpec() const
#endif
}
int index =mkspec.lastIndexOf('/');
int index = mkspec.lastIndexOf('/');
if(index == -1)
index = mkspec.lastIndexOf('\\');
if (index >= 0 && QDir(mkspec.left(index)).canonicalPath() == QDir(m_path + "/mkspecs/").canonicalPath())
QString mkspecDir = QDir(m_path + "/mkspecs/").canonicalPath();
if (index >= 0 && QDir(mkspec.left(index)).canonicalPath() == mkspecDir)
mkspec = mkspec.mid(index+1).trimmed();
m_mkspec = mkspec;
......@@ -1112,7 +1114,7 @@ QString QtVersion::makeCommand() const
{
#ifdef Q_OS_WIN
const QString &spec = mkspec();
if (spec.startsWith("win32-msvc") || spec == QLatin1String("win32-icc"))
if (spec.contains("win32-msvc") || spec.contains(QLatin1String("win32-icc")))
return "nmake.exe";
else if(spec.startsWith("wince"))
return "nmake.exe";
......@@ -1149,7 +1151,7 @@ QtVersion::ToolchainType QtVersion::toolchainType() const
if (!isValid())
return INVALID;
const QString &spec = mkspec();
if(spec.startsWith("win32-msvc") || spec == QLatin1String("win32-icc"))
if(spec.contains("win32-msvc") || spec.contains(QLatin1String("win32-icc")))
return MSVC;
else if(spec == "win32-g++")
return MinGW;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment