don't re-implement QDir::canonicalFilePath() by hand

This commit is contained in:
Oswald Buddenhagen
2011-04-04 14:55:03 +02:00
parent 2e739d8e4d
commit 2f1993e499
2 changed files with 2 additions and 14 deletions

View File

@@ -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;