Commit 381798ad authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Store the original C++ Document when searching.

parent 47b620e9
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#include <AST.h> #include <AST.h>
#include <ASTVisitor.h> #include <ASTVisitor.h>
#include <TranslationUnit.h> #include <TranslationUnit.h>
#include <PrettyPrinter.h>
#include <cplusplus/PreprocessorEnvironment.h> #include <cplusplus/PreprocessorEnvironment.h>
#include <cplusplus/pp.h> #include <cplusplus/pp.h>
...@@ -140,6 +139,7 @@ class FindClass: protected ASTVisitor ...@@ -140,6 +139,7 @@ class FindClass: protected ASTVisitor
QFutureInterface<Core::Utils::FileSearchResult> &_future; QFutureInterface<Core::Utils::FileSearchResult> &_future;
Document::Ptr _doc; Document::Ptr _doc;
Snapshot _snapshot; Snapshot _snapshot;
Document::Ptr _thisDocument;
QByteArray _source; QByteArray _source;
QString _text; QString _text;
...@@ -152,6 +152,7 @@ public: ...@@ -152,6 +152,7 @@ public:
_doc(doc), _doc(doc),
_snapshot(snapshot) _snapshot(snapshot)
{ {
_thisDocument = _snapshot.value(_doc->fileName());
} }
void operator()(AST *ast, const QByteArray &source, const QString &text, void operator()(AST *ast, const QByteArray &source, const QString &text,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment