forked from qt-creator/qt-creator
Fixes: Build on msvc
RevBy: Found by me.
This commit is contained in:
@@ -963,7 +963,7 @@ void QtVersion::updateVersionInfo() const
|
|||||||
QString line = stream.readLine();
|
QString line = stream.readLine();
|
||||||
int index = line.indexOf(":");
|
int index = line.indexOf(":");
|
||||||
if (index != -1)
|
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());
|
mkspec = mkspec.mid(QString("$$QT_BUILD_TREE/mkspecs/").length());
|
||||||
else if (mkspec.startsWith("$$QT_BUILD_TREE\\mkspecs\\"))
|
else if (mkspec.startsWith("$$QT_BUILD_TREE\\mkspecs\\"))
|
||||||
mkspec = mkspec.mid(QString("$$QT_BUILD_TREE\\mkspecs\\").length());
|
mkspec = mkspec.mid(QString("$$QT_BUILD_TREE\\mkspecs\\").length());
|
||||||
|
mkspec = QDir::fromNativeSeparators(mkspec);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1100,7 +1101,8 @@ void QtVersion::updateMkSpec() const
|
|||||||
int index = mkspec.lastIndexOf('/');
|
int index = mkspec.lastIndexOf('/');
|
||||||
if(index == -1)
|
if(index == -1)
|
||||||
index = mkspec.lastIndexOf('\\');
|
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();
|
mkspec = mkspec.mid(index+1).trimmed();
|
||||||
|
|
||||||
m_mkspec = mkspec;
|
m_mkspec = mkspec;
|
||||||
@@ -1112,7 +1114,7 @@ QString QtVersion::makeCommand() const
|
|||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
const QString &spec = mkspec();
|
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";
|
return "nmake.exe";
|
||||||
else if(spec.startsWith("wince"))
|
else if(spec.startsWith("wince"))
|
||||||
return "nmake.exe";
|
return "nmake.exe";
|
||||||
@@ -1149,7 +1151,7 @@ QtVersion::ToolchainType QtVersion::toolchainType() const
|
|||||||
if (!isValid())
|
if (!isValid())
|
||||||
return INVALID;
|
return INVALID;
|
||||||
const QString &spec = mkspec();
|
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;
|
return MSVC;
|
||||||
else if(spec == "win32-g++")
|
else if(spec == "win32-g++")
|
||||||
return MinGW;
|
return MinGW;
|
||||||
|
|||||||
Reference in New Issue
Block a user