forked from qt-creator/qt-creator
CppTools: Add revisions to AbstractEditorSupport
So far revisions for AbstractEditorSupport were not needed because until
recently we only had a single snapshot ("global snapshot"). Now, since
editor snapshots are introduced, we need to make sure to update the
corresponding documents in these snapshots, too. To do this efficiently,
a revision is introduced for AbstractEditorSupport.
Task-number: QTCREATORBUG-10894
Change-Id: Ibad1dbbafb7c721d1328959c1e903345fe465326
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
namespace CppTools {
|
||||
|
||||
AbstractEditorSupport::AbstractEditorSupport(CppModelManagerInterface *modelmanager) :
|
||||
m_modelmanager(modelmanager)
|
||||
m_modelmanager(modelmanager), m_revision(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ AbstractEditorSupport::~AbstractEditorSupport()
|
||||
|
||||
void AbstractEditorSupport::updateDocument()
|
||||
{
|
||||
++m_revision;
|
||||
m_modelmanager->updateSourceFiles(QStringList(fileName()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user