forked from qt-creator/qt-creator
Quickfix: Add a typeOf helper to conveniently get the type of an expr.
Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <texteditor/icompletioncollector.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/TypeOfExpression.h>
|
||||
#include <ASTfwd.h>
|
||||
|
||||
#include <utils/changeset.h>
|
||||
@@ -114,7 +115,7 @@ protected:
|
||||
void copy(const CPlusPlus::AST *ast, int to);
|
||||
|
||||
QString textOf(int firstOffset, int lastOffset) const;
|
||||
QString textOf(CPlusPlus::AST *ast) const;
|
||||
QString textOf(const CPlusPlus::AST *ast) const;
|
||||
|
||||
struct Range {
|
||||
Range() {}
|
||||
@@ -127,6 +128,8 @@ protected:
|
||||
Range createRange(CPlusPlus::AST *ast) const; // ### rename me
|
||||
void reindent(const Range &range);
|
||||
|
||||
const QList<CPlusPlus::LookupItem> typeOf(const CPlusPlus::ExpressionAST *ast);
|
||||
|
||||
private:
|
||||
CPlusPlus::Document::Ptr _document;
|
||||
CPlusPlus::Snapshot _snapshot;
|
||||
@@ -134,6 +137,7 @@ private:
|
||||
Utils::ChangeSet _changeSet;
|
||||
CPPEditor *_editor;
|
||||
CPlusPlus::AST *_topLevelNode;
|
||||
CPlusPlus::TypeOfExpression _typeOfExpression;
|
||||
};
|
||||
|
||||
class CPPQuickFixCollector: public TextEditor::IQuickFixCollector
|
||||
|
||||
Reference in New Issue
Block a user