forked from qt-creator/qt-creator
don't re-implement QDir::canonicalFilePath() by hand
This commit is contained in:
@@ -1487,7 +1487,7 @@ void QtVersion::updateAbiAndMkspec() const
|
||||
mkspecFullPath = baseMkspecDir + "/macx-g++";
|
||||
}
|
||||
//resolve mkspec link
|
||||
mkspecFullPath = resolveLink(mkspecFullPath);
|
||||
mkspecFullPath = QFileInfo(mkspecFullPath).canonicalFilePath();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1495,7 +1495,7 @@ void QtVersion::updateAbiAndMkspec() const
|
||||
f2.close();
|
||||
}
|
||||
#else
|
||||
mkspecFullPath =resolveLink(mkspecFullPath);
|
||||
mkspecFullPath = QFileInfo(mkspecFullPath).canonicalFilePath();
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -1650,17 +1650,6 @@ void QtVersion::updateAbiAndMkspec() const
|
||||
}
|
||||
}
|
||||
|
||||
QString QtVersion::resolveLink(const QString &path) const
|
||||
{
|
||||
QFileInfo f(path);
|
||||
int links = 16;
|
||||
while (links-- && f.isSymLink())
|
||||
f.setFile(f.symLinkTarget());
|
||||
if (links <= 0)
|
||||
return QString();
|
||||
return f.filePath();
|
||||
}
|
||||
|
||||
QString QtVersion::qtCorePath() const
|
||||
{
|
||||
QList<QDir> dirs;
|
||||
|
||||
Reference in New Issue
Block a user