Commit a3735ead authored by Robert Loehning's avatar Robert Loehning
Browse files

BaseQtVersion: Check return value of QFile::open



Change-Id: Iba199ec29e4e8f4e74ffe6e76262eac0538c65ea
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 1f740379
...@@ -1572,8 +1572,7 @@ FileName BaseQtVersion::sourcePath(const QHash<ProKey, ProString> &versionInfo) ...@@ -1572,8 +1572,7 @@ FileName BaseQtVersion::sourcePath(const QHash<ProKey, ProString> &versionInfo)
const QString installData = qmakeProperty(versionInfo, "QT_INSTALL_PREFIX"); const QString installData = qmakeProperty(versionInfo, "QT_INSTALL_PREFIX");
QString sourcePath = installData; QString sourcePath = installData;
QFile qmakeCache(installData + QLatin1String("/.qmake.cache")); QFile qmakeCache(installData + QLatin1String("/.qmake.cache"));
if (qmakeCache.exists()) { if (qmakeCache.exists() && qmakeCache.open(QIODevice::ReadOnly | QIODevice::Text)) {
qmakeCache.open(QIODevice::ReadOnly | QIODevice::Text);
QTextStream stream(&qmakeCache); QTextStream stream(&qmakeCache);
while (!stream.atEnd()) { while (!stream.atEnd()) {
QString line = stream.readLine().trimmed(); QString line = stream.readLine().trimmed();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment