[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdev-clang] /: Also aquire the foregroundLock and reset the tracker
From: Olivier JG <olivier.jg () gmail ! com>
Date: 2015-10-08 13:08:58
Message-ID: E1ZkAwM-0002eh-KE () scm ! kde ! org
[Download RAW message or body]
Git commit 8f50342dc667a57af8d18a36627065ae7c509637 by Olivier JG.
Committed on 08/10/2015 at 13:09.
Pushed by olivierjg into branch 'master'.
Also aquire the foregroundLock and reset the tracker
M +9 -4 clangparsejob.cpp
http://commits.kde.org/kdev-clang/8f50342dc667a57af8d18a36627065ae7c509637
diff --git a/clangparsejob.cpp b/clangparsejob.cpp
index 215e393..a551e37 100644
--- a/clangparsejob.cpp
+++ b/clangparsejob.cpp
@@ -52,6 +52,7 @@
#include "duchain/clangparsingenvironmentfile.h"
#include "util/clangdebug.h"
#include "util/clangtypes.h"
+#include "util/foregroundlock.h"
#include "clangsupport.h"
#include "documentfinderhelpers.h"
@@ -320,11 +321,15 @@ void ClangParseJob::run(ThreadWeaver::JobPointer /*self*/, ThreadWeaver::Thread
// prefer the editor modification revision, instead of the on-disk revision
auto it = m_unsavedRevisions.find(url);
if (it != m_unsavedRevisions.end()) {
- DUChainWriteLocker lock;
- auto file = parsingEnvironmentFile(context);
- Q_ASSERT(file);
- file->setModificationRevision(it.value());
+ {
+ DUChainWriteLocker lock;
+ auto file = parsingEnvironmentFile(context);
+ Q_ASSERT(file);
+ file->setModificationRevision(it.value());
+ }
if (tracker) {
+ ForegroundLock lock;
+ tracker->reset();
tracker->acquireRevision(it.value().revision);
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic