forked from qt-creator/qt-creator
QmlJS: Fix resolving of implicit dependencies
If the QtQuick import was less than 2.15 implicit dependencies were not properly resolved. For example if a type from a module derives from QtQml.QtObject. Change-Id: I42a3320ee91496da0991de2018efcd124d56f6cd Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
@@ -492,8 +492,11 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
|
|||||||
for (const auto &toImport : libraryInfo.imports()) {
|
for (const auto &toImport : libraryInfo.imports()) {
|
||||||
QString importName = toImport.module;
|
QString importName = toImport.module;
|
||||||
ComponentVersion vNow = toImport.version;
|
ComponentVersion vNow = toImport.version;
|
||||||
// there was a period in which no version == auto, should we add || !vNow.isValid() to the if?
|
/* There was a period in which no version == auto
|
||||||
if (toImport.flags & QmlDirParser::Import::Auto)
|
* Required for QtQuick imports less than 2.15
|
||||||
|
*/
|
||||||
|
if ((toImport.flags & QmlDirParser::Import::Auto)
|
||||||
|
|| !vNow.isValid())
|
||||||
vNow = version;
|
vNow = version;
|
||||||
Import subImport;
|
Import subImport;
|
||||||
subImport.valid = true;
|
subImport.valid = true;
|
||||||
|
Reference in New Issue
Block a user