Commit 046f510e authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Fix revision check in CppLocatorData

Bug was exhibited by running e.g.

 ./qtcreator -test CppEditor,test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS \
   -test CppTools,test_cpplocatorfilters_CppLocatorFilter:CppFunctionsFilter-WithNamespacePrefix

Change-Id: I57d96a8f7bf0aea6eb11cb68d1b981808533ce41
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 21f272a8
......@@ -54,8 +54,7 @@ void CppLocatorData::onDocumentUpdated(const CPlusPlus::Document::Ptr &document)
int i = 0, ei = m_pendingDocuments.size();
for (; i < ei; ++i) {
const CPlusPlus::Document::Ptr &doc = m_pendingDocuments.at(i);
if (doc->fileName() == document->fileName()
&& doc->revision() < document->revision()) {
if (doc->fileName() == document->fileName() && doc->revision() <= document->revision()) {
m_pendingDocuments[i] = document;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment