Fix a bug in how paths are made canonical and relative

Change-Id: Id9b2de9097cab4520882b48a28fccd382c5e076d
Reviewed-by: Martin Smith <martin.smith@digia.com>
This commit is contained in:
Jan Arve Saether 2012-09-21 15:05:04 +02:00 committed by The Qt Project
parent e4a6f44ce1
commit 983badb1dc

View File

@ -238,7 +238,7 @@ QString Location::fileName() const
*/
QString Location::canonicalRelativePath(const QString &path) const
{
QDir configFileDir(QFileInfo(filePath()).dir());
QDir configFileDir(QDir::current());
QDir dir(path);
const QString canon = dir.canonicalPath();
return configFileDir.relativeFilePath(canon);