CppTools: Update document on activation

...if the project was updated in the meanwhile.

If a project is updated mark invisible editor documents dirty and update
them if they get focus.

This also fixes document highlighting when restoring a session for
documents that the user "switched away" before the project info is
pushed to CppModelManager.

This completes

    CppTools: Update visible documents on project update
    commit c2eb91e053

which only takes care of visible documents.

Task-number: QTCREATORBUG-13270
Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-12-02 12:11:05 +01:00
parent 9cd552a165
commit cb0d136926
6 changed files with 121 additions and 11 deletions

View File

@@ -42,6 +42,9 @@ public:
EditorDocumentHandle();
virtual ~EditorDocumentHandle();
bool needsRefresh() const;
void setNeedsRefresh(bool needsRefresh);
// For the Working Copy
virtual QString filePath() const = 0;
virtual QByteArray contents() const = 0;
@@ -49,6 +52,9 @@ public:
// For updating if new project info is set
virtual BaseEditorDocumentProcessor *processor() = 0;
private:
bool m_needsRefresh;
};
} // namespace CppTools