forked from qt-creator/qt-creator
C++: Slim down SemanticInfo
Remove SemanticInfo::hasD and SemanticInfo::hasQ. They were used in CPPEditorWidget::highlightUses() but became superfluous by filtering out invalid Uses. Change-Id: I08f46e55cf42fbc6088fbcb03e30822421df57d6 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -51,13 +51,11 @@ class FindLocalSymbols: protected ASTVisitor
|
||||
|
||||
public:
|
||||
FindLocalSymbols(Document::Ptr doc)
|
||||
: ASTVisitor(doc->translationUnit()), _doc(doc), hasD(false), hasQ(false)
|
||||
: ASTVisitor(doc->translationUnit()), _doc(doc)
|
||||
{ }
|
||||
|
||||
// local and external uses.
|
||||
SemanticInfo::LocalUseMap localUses;
|
||||
bool hasD;
|
||||
bool hasQ;
|
||||
|
||||
void operator()(DeclarationAST *ast)
|
||||
{
|
||||
@@ -169,16 +167,6 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(QtMemberDeclarationAST *ast)
|
||||
{
|
||||
if (tokenKind(ast->q_token) == T_Q_D)
|
||||
hasD = true;
|
||||
else
|
||||
hasQ = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(FunctionDefinitionAST *ast)
|
||||
{
|
||||
if (ast->symbol)
|
||||
@@ -313,7 +301,5 @@ LocalSymbols::LocalSymbols(CPlusPlus::Document::Ptr doc, CPlusPlus::DeclarationA
|
||||
{
|
||||
FindLocalSymbols findLocalSymbols(doc);
|
||||
findLocalSymbols(ast);
|
||||
hasD = findLocalSymbols.hasD;
|
||||
hasQ = findLocalSymbols.hasQ;
|
||||
uses = findLocalSymbols.localUses;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user