Quickfix: Use a LookupContext instead of TypeOfExpression to get type.

There's no need to reparse something we already got the AST of.
This commit is contained in:
Christian Kamm
2009-12-23 14:54:02 +01:00
parent 0daf22c7a0
commit f463f3ab07
2 changed files with 9 additions and 7 deletions

View File

@@ -33,7 +33,7 @@
#include <texteditor/icompletioncollector.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/TypeOfExpression.h>
#include <cplusplus/LookupContext.h>
#include <ASTfwd.h>
#include <utils/changeset.h>
@@ -128,7 +128,7 @@ protected:
Range createRange(CPlusPlus::AST *ast) const; // ### rename me
void reindent(const Range &range);
const QList<CPlusPlus::LookupItem> typeOf(const CPlusPlus::ExpressionAST *ast);
const QList<CPlusPlus::LookupItem> typeOf(CPlusPlus::ExpressionAST *ast);
private:
CPlusPlus::Document::Ptr _document;
@@ -137,7 +137,7 @@ private:
Utils::ChangeSet _changeSet;
CPPEditor *_editor;
CPlusPlus::AST *_topLevelNode;
CPlusPlus::TypeOfExpression _typeOfExpression;
CPlusPlus::LookupContext _lookupContext;
};
class CPPQuickFixCollector: public TextEditor::IQuickFixCollector