forked from qt-creator/qt-creator
Renamed switchCurrentEntity()
This commit is contained in:
@@ -657,7 +657,7 @@ CreateBindings::~CreateBindings()
|
|||||||
delete _control;
|
delete _control;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassOrNamespace *CreateBindings::switchCurrentEntity(ClassOrNamespace *classOrNamespace)
|
ClassOrNamespace *CreateBindings::switchCurrentClassOrNamespace(ClassOrNamespace *classOrNamespace)
|
||||||
{
|
{
|
||||||
ClassOrNamespace *previous = _currentClassOrNamespace;
|
ClassOrNamespace *previous = _currentClassOrNamespace;
|
||||||
_currentClassOrNamespace = classOrNamespace;
|
_currentClassOrNamespace = classOrNamespace;
|
||||||
@@ -693,9 +693,9 @@ ClassOrNamespace *CreateBindings::findClassOrNamespace(const QList<const Name *>
|
|||||||
|
|
||||||
void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace)
|
void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace)
|
||||||
{
|
{
|
||||||
ClassOrNamespace *previous = switchCurrentEntity(classOrNamespace);
|
ClassOrNamespace *previous = switchCurrentClassOrNamespace(classOrNamespace);
|
||||||
accept(s);
|
accept(s);
|
||||||
(void) switchCurrentEntity(previous);
|
(void) switchCurrentClassOrNamespace(previous);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateBindings::process(Symbol *symbol)
|
void CreateBindings::process(Symbol *symbol)
|
||||||
@@ -743,7 +743,7 @@ ClassOrNamespace *CreateBindings::enterEntity(Symbol *symbol)
|
|||||||
ClassOrNamespace *entity = _currentClassOrNamespace->findOrCreate(symbol->name());
|
ClassOrNamespace *entity = _currentClassOrNamespace->findOrCreate(symbol->name());
|
||||||
entity->addSymbol(symbol);
|
entity->addSymbol(symbol);
|
||||||
|
|
||||||
return switchCurrentEntity(entity);
|
return switchCurrentClassOrNamespace(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassOrNamespace *CreateBindings::enterGlobalEntity(Symbol *symbol)
|
ClassOrNamespace *CreateBindings::enterGlobalEntity(Symbol *symbol)
|
||||||
@@ -751,7 +751,7 @@ ClassOrNamespace *CreateBindings::enterGlobalEntity(Symbol *symbol)
|
|||||||
ClassOrNamespace *entity = _globalNamespace->findOrCreate(symbol->name());
|
ClassOrNamespace *entity = _globalNamespace->findOrCreate(symbol->name());
|
||||||
entity->addSymbol(symbol);
|
entity->addSymbol(symbol);
|
||||||
|
|
||||||
return switchCurrentEntity(entity);
|
return switchCurrentClassOrNamespace(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreateBindings::visit(Namespace *ns)
|
bool CreateBindings::visit(Namespace *ns)
|
||||||
|
|||||||
@@ -120,12 +120,6 @@ public:
|
|||||||
ClassOrNamespace *findClassOrNamespace(Symbol *s); // ### rename
|
ClassOrNamespace *findClassOrNamespace(Symbol *s); // ### rename
|
||||||
ClassOrNamespace *findClassOrNamespace(const QList<const Name *> &path);
|
ClassOrNamespace *findClassOrNamespace(const QList<const Name *> &path);
|
||||||
|
|
||||||
/// \internal
|
|
||||||
void process(Symbol *s, ClassOrNamespace *classOrNamespace);
|
|
||||||
|
|
||||||
/// \internal
|
|
||||||
ClassOrNamespace *allocClassOrNamespace(ClassOrNamespace *parent);
|
|
||||||
|
|
||||||
/// \internal
|
/// \internal
|
||||||
Control *control() const;
|
Control *control() const;
|
||||||
|
|
||||||
@@ -133,10 +127,16 @@ public:
|
|||||||
void lookupInScope(const Name *name, Scope *scope, QList<Symbol *> *result,
|
void lookupInScope(const Name *name, Scope *scope, QList<Symbol *> *result,
|
||||||
const TemplateNameId *templateId);
|
const TemplateNameId *templateId);
|
||||||
|
|
||||||
|
/// \internal
|
||||||
|
void process(Symbol *s, ClassOrNamespace *classOrNamespace);
|
||||||
|
|
||||||
|
/// \internal
|
||||||
|
ClassOrNamespace *allocClassOrNamespace(ClassOrNamespace *parent);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
using SymbolVisitor::visit;
|
using SymbolVisitor::visit;
|
||||||
|
|
||||||
ClassOrNamespace *switchCurrentEntity(ClassOrNamespace *classOrNamespace);
|
ClassOrNamespace *switchCurrentClassOrNamespace(ClassOrNamespace *classOrNamespace);
|
||||||
ClassOrNamespace *enterEntity(Symbol *symbol);
|
ClassOrNamespace *enterEntity(Symbol *symbol);
|
||||||
ClassOrNamespace *enterGlobalEntity(Symbol *symbol);
|
ClassOrNamespace *enterGlobalEntity(Symbol *symbol);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user