summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppquickfixes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index 123acefb22..3c5ab5a2b9 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -211,7 +211,7 @@ Class *isMemberFunction(const LookupContext &context, Function *function)
if (!q->base())
return 0;
- if (ClassOrNamespace *binding = context.lookupType(q->base(), enclosingScope)) {
+ if (LookupScope *binding = context.lookupType(q->base(), enclosingScope)) {
foreach (Symbol *s, binding->symbols()) {
if (Class *matchingClass = s->asClass())
return matchingClass;
@@ -249,7 +249,7 @@ Namespace *isNamespaceFunction(const LookupContext &context, Function *function)
if (!q->base())
return 0;
- if (ClassOrNamespace *binding = context.lookupType(q->base(), enclosingScope)) {
+ if (LookupScope *binding = context.lookupType(q->base(), enclosingScope)) {
foreach (Symbol *s, binding->symbols()) {
if (Namespace *matchingNamespace = s->asNamespace())
return matchingNamespace;
@@ -1323,7 +1323,7 @@ void TranslateStringLiteral::match(const CppQuickFixInterface &interface,
for (int i = path.size() - 1; i >= 0; --i) {
if (FunctionDefinitionAST *definition = path.at(i)->asFunctionDefinition()) {
Function *function = definition->symbol;
- ClassOrNamespace *b = interface.context().lookupType(function);
+ LookupScope *b = interface.context().lookupType(function);
if (b) {
// Do we have a tr function?
foreach (const LookupItem &r, b->find(trName)) {
@@ -1584,7 +1584,7 @@ public:
SubstitutionEnvironment env;
env.setContext(context());
env.switchScope(result.first().scope());
- ClassOrNamespace *con = typeOfExpression.context().lookupType(scope);
+ LookupScope *con = typeOfExpression.context().lookupType(scope);
if (!con)
con = typeOfExpression.context().globalNamespace();
UseMinimalNames q(con);
@@ -2274,7 +2274,7 @@ Enum *findEnum(const QList<LookupItem> &results, const LookupContext &ctxt)
if (Enum *e = type->asEnumType())
return e;
if (const NamedType *namedType = type->asNamedType()) {
- if (ClassOrNamespace *con = ctxt.lookupType(namedType->name(), result.scope())) {
+ if (LookupScope *con = ctxt.lookupType(namedType->name(), result.scope())) {
const QList<Enum *> enums = con->unscopedEnums();
const Name *referenceName = namedType->name();
if (const QualifiedNameId *qualifiedName = referenceName->asQualifiedNameId())
@@ -2571,7 +2571,7 @@ public:
Document::Ptr targetDoc = targetFile->cppDocument();
Scope *targetScope = targetDoc->scopeAt(m_loc.line(), m_loc.column());
LookupContext targetContext(targetDoc, snapshot());
- ClassOrNamespace *targetCoN = targetContext.lookupType(targetScope);
+ LookupScope *targetCoN = targetContext.lookupType(targetScope);
if (!targetCoN)
targetCoN = targetContext.globalNamespace();
@@ -3173,7 +3173,7 @@ public:
SubstitutionEnvironment env;
env.setContext(context());
env.switchScope(refFunc);
- ClassOrNamespace *targetCoN = context().lookupType(refFunc->enclosingScope());
+ LookupScope *targetCoN = context().lookupType(refFunc->enclosingScope());
if (!targetCoN)
targetCoN = context().globalNamespace();
UseMinimalNames subs(targetCoN);
@@ -4574,7 +4574,7 @@ QString definitionSignature(const CppQuickFixInterface *assist,
QTC_ASSERT(func, return QString());
LookupContext cppContext(targetFile->cppDocument(), assist->snapshot());
- ClassOrNamespace *cppCoN = cppContext.lookupType(scope);
+ LookupScope *cppCoN = cppContext.lookupType(scope);
if (!cppCoN)
cppCoN = cppContext.globalNamespace();
SubstitutionEnvironment env;
@@ -5055,7 +5055,7 @@ public:
SubstitutionEnvironment env;
env.setContext(context());
env.switchScope(result.first().scope());
- ClassOrNamespace *con = typeOfExpression.context().lookupType(scope);
+ LookupScope *con = typeOfExpression.context().lookupType(scope);
if (!con)
con = typeOfExpression.context().globalNamespace();
UseMinimalNames q(con);
@@ -5654,7 +5654,7 @@ PointerType *determineConvertedType(NamedType *namedType, const LookupContext &c
{
if (!namedType)
return 0;
- if (ClassOrNamespace *binding = context.lookupType(namedType->name(), scope)) {
+ if (LookupScope *binding = context.lookupType(namedType->name(), scope)) {
if (Symbol *objectClassSymbol = skipForwardDeclarations(binding->symbols())) {
if (Class *klass = objectClassSymbol->asClass()) {
for (auto it = klass->memberBegin(), end = klass->memberEnd(); it != end; ++it) {
@@ -5712,7 +5712,7 @@ Class *senderOrReceiverClass(const CppQuickFixInterface &interface,
NamedType *objectType = objectTypeBase->asNamedType();
QTC_ASSERT(objectType, return 0);
- ClassOrNamespace *objectClassCON = context.lookupType(objectType->name(), objectPointerScope);
+ LookupScope *objectClassCON = context.lookupType(objectType->name(), objectPointerScope);
QTC_ASSERT(objectClassCON, return 0);
QTC_ASSERT(!objectClassCON->symbols().isEmpty(), return 0);
@@ -5764,7 +5764,7 @@ bool findConnectReplacement(const CppQuickFixInterface &interface,
// Minimize qualification
Control *control = context.bindings()->control().data();
- ClassOrNamespace *functionCON = context.lookupParent(scope);
+ LookupScope *functionCON = context.lookupParent(scope);
const Name *shortName = LookupContext::minimalName(method, functionCON, control);
if (!shortName->asQualifiedNameId())
shortName = control->qualifiedNameId(classOfMethod->name(), shortName);