forked from qt-creator/qt-creator
qmljs: actually fix incorrect condition
Suppress error message if either the current or the sub import are optional. Change-Id: I6ab8592c6aa8b20576bfa897e432d317f8a7e3b5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -503,7 +503,7 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
|
||||
|
||||
if (!subImportFound && errorLoc.isValid()) {
|
||||
import->valid = false;
|
||||
if (toImport.flags & QmlDirParser::Import::Optional)
|
||||
if (!(optional || (toImport.flags & QmlDirParser::Import::Optional)))
|
||||
error(doc, errorLoc,
|
||||
Link::tr(
|
||||
"Implicit import '%1' of QML module '%2' not found.\n\n"
|
||||
|
Reference in New Issue
Block a user