From f3faef5a1e345b02dfca0b8c682e5e36e318849f Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 11 Oct 2012 16:16:01 +0200 Subject: C++: Fix outdated macro usage info in documents. Record revisions of documents in macro definitions and usages. Then, when searching for usages, check the revision of the documents against the revision of the macros. If they are out-of-sync, repreprocess the documents to get up-to-date info. Task-number: QTCREATORBUG-7872 Change-Id: I846bb52ec660024728ab117a9fb7e43382a50e63 Reviewed-by: Christian Stenger --- src/plugins/cpptools/cpprefactoringchanges.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cpprefactoringchanges.cpp') diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp index 65341c4e14..5027e22717 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.cpp +++ b/src/plugins/cpptools/cpprefactoringchanges.cpp @@ -156,8 +156,7 @@ Document::Ptr CppRefactoringFile::cppDocument() const const QString name = fileName(); const Snapshot &snapshot = data()->m_snapshot; - const QByteArray contents = snapshot.preprocessedCode(source, name); - m_cppDocument = snapshot.documentFromSource(contents, name); + m_cppDocument = snapshot.preprocessedDocument(source, name); m_cppDocument->check(); } -- cgit v1.2.1