QmlJS: Abort if file could not be opened

Change-Id: Ic2175c2b8dc6ec8ce378db07bdd2b667b15f70cb
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Robert Loehning
2017-04-06 12:42:23 +02:00
parent 76dc24c3b7
commit 6344815d0d

View File

@@ -782,7 +782,8 @@ static bool findNewQmlLibraryInPath(const QString &path,
}
// found a new library!
qmldirFile.open(QFile::ReadOnly);
if (!qmldirFile.open(QFile::ReadOnly))
return false;
QString qmldirData = QString::fromUtf8(qmldirFile.readAll());
QmlDirParser qmldirParser;