diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-11-08 15:05:06 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-11-08 14:27:32 +0000 |
commit | 97f8ec24fa1cfce7efdf96ab5ab779fff6940bf9 (patch) | |
tree | c231427abac4d89cff72f30192b107379c727974 /src/lib/corelib | |
parent | 4d4cb193e40ff0dd55b2a201ab4fc783dabe1214 (diff) | |
download | qbs-97f8ec24fa1cfce7efdf96ab5ab779fff6940bf9.tar.gz |
Fix import search path precedence
Items located lower in the search path stack would overwrite existing,
higher-priorized entries.
Change-Id: Ie7660428cf6f0969bf880941344a9f88cdb51021
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib')
-rw-r--r-- | src/lib/corelib/language/astimportshandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/language/astimportshandler.cpp b/src/lib/corelib/language/astimportshandler.cpp index 783b67dfe..c4c701f22 100644 --- a/src/lib/corelib/language/astimportshandler.cpp +++ b/src/lib/corelib/language/astimportshandler.cpp @@ -232,7 +232,8 @@ bool ASTImportsHandler::addPrototype(const QString &fileName, const QString &fil if (!as.isEmpty()) prototypeName.append(as); prototypeName.append(componentName); - m_typeNameToFile.insert(prototypeName, filePath); + if (!m_typeNameToFile.contains(prototypeName)) + m_typeNameToFile.insert(prototypeName, filePath); return true; } |