forked from qt-creator/qt-creator
		
	Check only NameId and TemplateNameId
This commit is contained in:
		@@ -170,13 +170,30 @@ bool FindUsages::compareFullyQualifiedName(const QList<const Name *> &path, cons
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < path.length(); ++i) {
 | 
			
		||||
        if (! path.at(i)->isEqualTo(other.at(i)))
 | 
			
		||||
        if (! compareName(path.at(i), other.at(i)))
 | 
			
		||||
            return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool FindUsages::compareName(const Name *name, const Name *other)
 | 
			
		||||
{
 | 
			
		||||
    if (name == other)
 | 
			
		||||
        return true;
 | 
			
		||||
 | 
			
		||||
    else if (name && other) {
 | 
			
		||||
        const Identifier *id = name->identifier();
 | 
			
		||||
        const Identifier *otherId = other->identifier();
 | 
			
		||||
 | 
			
		||||
        if (id == otherId || (id && id->isEqualTo(otherId)))
 | 
			
		||||
            return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bool FindUsages::checkCandidates(const QList<LookupItem> &candidates) const
 | 
			
		||||
{
 | 
			
		||||
    for (int i = candidates.size() - 1; i != -1; --i) {
 | 
			
		||||
 
 | 
			
		||||
@@ -106,6 +106,7 @@ protected:
 | 
			
		||||
 | 
			
		||||
    unsigned startOfTemplateDeclaration(TemplateDeclarationAST *ast) const;
 | 
			
		||||
    static bool compareFullyQualifiedName(const QList<const Name *> &path, const QList<const Name *> &other);
 | 
			
		||||
    static bool compareName(const Name *name, const Name *other);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    const Identifier *_id;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user