forked from qt-creator/qt-creator
QmlJS: Improve support for multiple imports into same alias
Add extra handling for aliased imports to avoid handling shadowed imports as unknown which in turn ignored them and marked their members as unknown types and did not provide auto completion for their members. Fixes: QTCREATORBUG-15684 Change-Id: Iee1009cbdfde13ce261854c3239b9b50c434f563 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -1094,10 +1094,13 @@ public:
|
||||
bool importFailed() const;
|
||||
|
||||
const QList<Import> &all() const;
|
||||
const ObjectValue *aliased(const QString &name) const;
|
||||
|
||||
const TypeScope *typeScope() const;
|
||||
const JSImportScope *jsImportScope() const;
|
||||
|
||||
const ObjectValue *resolveAliasAndMarkUsed(const QString &name) const;
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
void dump() const;
|
||||
#endif
|
||||
@@ -1106,6 +1109,7 @@ private:
|
||||
// holds imports in the order they appeared,
|
||||
// lookup order is back to front
|
||||
QList<Import> m_imports;
|
||||
QHash<QString, ObjectValue *> m_aliased;
|
||||
TypeScope *m_typeScope;
|
||||
JSImportScope *m_jsImportScope;
|
||||
bool m_importFailed;
|
||||
|
||||
Reference in New Issue
Block a user