forked from qt-creator/qt-creator
Clang: Fix delayed reparse of dirty and visible but not current documents
1. Open document foo.h
2. Create a split and open foo.cpp (#including "foo.h")
3. Edit foo.h (e.g. by introducing a syntax error, so that foo.cpp will
indicate header errors in the toolbar or as info bar)
=> Actual: foo.cpp will be reparsed immediately.
Expected: foo.cpp should be reparsed after a delay.
This saves resources (cpu time) and minimizes poping up of the header
info bar while editing header files in splits.
Regression introduced by
commit 380d756a03
Clang: Hook up supportive translation unit on first edit
Change-Id: Ib5fd90e49415dfc3aefacab7cd627b0e1937f5fc
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <QVector>
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
@@ -57,6 +58,9 @@ public:
|
||||
bool hasDocumentWithFilePath(const Utf8String &filePath) const;
|
||||
|
||||
const std::vector<Document> &documents() const;
|
||||
using IsMatchingDocument = std::function<bool(const Document &document)>;
|
||||
const std::vector<Document> filtered(const IsMatchingDocument &isMatchingDocument) const;
|
||||
std::vector<Document> dirtyAndVisibleButNotCurrentDocuments() const;
|
||||
|
||||
UnsavedFiles unsavedFiles() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user