forked from qt-creator/qt-creator
ClangCodeModel: Force clangd restart on external changes
Neither we nor clangd can afford to watch all source files, which means that after e.g. a branch switch we can easily end up in an inconsistent state. We alleviate this problem by restarting clangd if at least one open file was changed externally. Change-Id: I7e0d14835e3afbd7a64c3233614f2161282dddc0 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -120,6 +120,7 @@ public:
|
||||
bool isSaveAsAllowed() const override;
|
||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
||||
void setFilePath(const Utils::FilePath &newName) override;
|
||||
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const override;
|
||||
|
||||
QString fallbackSaveAsPath() const override;
|
||||
QString fallbackSaveAsFileName() const override;
|
||||
@@ -155,6 +156,10 @@ public:
|
||||
static QAction *createDiffAgainstCurrentFileAction(QObject *parent,
|
||||
const std::function<Utils::FilePath()> &filePath);
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
void setSilentReload();
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void aboutToOpen(const Utils::FilePath &filePath, const Utils::FilePath &realFilePath);
|
||||
void openFinishedSuccessfully();
|
||||
|
||||
Reference in New Issue
Block a user