forked from qt-creator/qt-creator
C++: Get rid of {Name,Type}::isEqualTo()
...since it's superseded by the class Matcher. For consistency, rename FullySpecifiedType::isEqualTo() to match(). Change-Id: I07640f9218d814e0350265de45f05929e5d595a9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -2294,7 +2294,7 @@ Enum *findEnum(const QList<LookupItem> &results, const LookupContext &ctxt)
|
||||
const Name *referenceName = namedType->name();
|
||||
foreach (Enum *e, enums) {
|
||||
if (const Name *candidateName = e->name()) {
|
||||
if (candidateName->isEqualTo(referenceName))
|
||||
if (candidateName->match(referenceName))
|
||||
return e;
|
||||
}
|
||||
}
|
||||
@@ -2485,11 +2485,11 @@ void InsertDeclFromDef::match(const CppQuickFixInterface &interface, QuickFixOpe
|
||||
const QualifiedNameId *qName = fun->name()->asQualifiedNameId();
|
||||
for (Symbol *s = matchingClass->find(qName->identifier()); s; s = s->next()) {
|
||||
if (!s->name()
|
||||
|| !qName->identifier()->isEqualTo(s->identifier())
|
||||
|| !qName->identifier()->match(s->identifier())
|
||||
|| !s->type()->isFunctionType())
|
||||
continue;
|
||||
|
||||
if (s->type().isEqualTo(fun->type())) {
|
||||
if (s->type().match(fun->type())) {
|
||||
// Declaration exists.
|
||||
return;
|
||||
}
|
||||
@@ -3671,9 +3671,9 @@ public:
|
||||
const QualifiedNameId *qName = func->name()->asQualifiedNameId();
|
||||
for (Symbol *s = matchingClass->find(qName->identifier()); s; s = s->next()) {
|
||||
if (!s->name()
|
||||
|| !qName->identifier()->isEqualTo(s->identifier())
|
||||
|| !qName->identifier()->match(s->identifier())
|
||||
|| !s->type()->isFunctionType()
|
||||
|| !s->type().isEqualTo(func->type())
|
||||
|| !s->type().match(func->type())
|
||||
|| s->isFunction()) {
|
||||
continue;
|
||||
}
|
||||
@@ -4391,9 +4391,9 @@ void MoveFuncDefToDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
|
||||
const QualifiedNameId *qName = func->name()->asQualifiedNameId();
|
||||
for (Symbol *s = matchingClass->find(qName->identifier()); s; s = s->next()) {
|
||||
if (!s->name()
|
||||
|| !qName->identifier()->isEqualTo(s->identifier())
|
||||
|| !qName->identifier()->match(s->identifier())
|
||||
|| !s->type()->isFunctionType()
|
||||
|| !s->type().isEqualTo(func->type())
|
||||
|| !s->type().match(func->type())
|
||||
|| s->isFunction()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user