Utils: Do not assume qtchooser target as valid

Change-Id: Ia92286cf8dbc810139ab0cb1e7440aa62d290e21
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Christian Stenger
2018-02-05 13:21:04 +01:00
parent 78ce194d95
commit 6f5f07d2e4

View File

@@ -66,7 +66,8 @@ static bool isQmake(const QString &path)
QFileInfo fi(path); QFileInfo fi(path);
if (BuildableHelperLibrary::isQtChooser(fi)) if (BuildableHelperLibrary::isQtChooser(fi))
fi.setFile(BuildableHelperLibrary::qtChooserToQmakePath(fi.symLinkTarget())); fi.setFile(BuildableHelperLibrary::qtChooserToQmakePath(fi.symLinkTarget()));
if (!fi.exists() || fi.isDir())
return false;
return !BuildableHelperLibrary::qtVersionForQMake(fi.absoluteFilePath()).isEmpty(); return !BuildableHelperLibrary::qtVersionForQMake(fi.absoluteFilePath()).isEmpty();
} }