forked from qt-creator/qt-creator
CppEditor: Remove using namespace quickfix: Don't insert inline namespaces
Change-Id: If386d31de723ca928d3c50f55e32205c50937b0a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -7538,7 +7538,9 @@ private:
|
||||
const QList<LookupItem> localLookup = m_context.lookup(ast->name->name, scope);
|
||||
QList<const Name *> longestName;
|
||||
for (const LookupItem &item : localLookup) {
|
||||
QList<const Name *> names = m_context.fullyQualifiedName(item.declaration());
|
||||
QList<const Name *> names
|
||||
= m_context.fullyQualifiedName(item.declaration(),
|
||||
LookupContext::HideInlineNamespaces);
|
||||
if (names.length() > longestName.length())
|
||||
longestName = names;
|
||||
}
|
||||
@@ -7574,8 +7576,9 @@ private:
|
||||
|
||||
const QList<LookupItem> lookups = m_context.lookup(wantToLookup, scope);
|
||||
if (!lookups.empty()) {
|
||||
QList<const Name *> fullName = m_context.fullyQualifiedName(
|
||||
lookups.first().declaration());
|
||||
QList<const Name *> fullName
|
||||
= m_context.fullyQualifiedName(lookups.first().declaration(),
|
||||
LookupContext::HideInlineNamespaces);
|
||||
const int currentNameCount = countNames(wantToLookup);
|
||||
const bool needNamespace = needMissingNamespaces(std::move(fullName),
|
||||
currentNameCount);
|
||||
|
||||
Reference in New Issue
Block a user