[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdev-clang] /: Revert "Have the document tracker aquire the unsaved file revision"
From: Olivier JG <olivier.jg () gmail ! com>
Date: 2015-10-08 13:40:17
Message-ID: E1ZkBQf-0005qY-3S () scm ! kde ! org
[Download RAW message or body]
Git commit 26685277412343b0b4e99de90b798980da82ea67 by Olivier JG.
Committed on 08/10/2015 at 13:44.
Pushed by olivierjg into branch 'master'.
Revert "Have the document tracker aquire the unsaved file revision"
This reverts commit 58401217240794ec1449eb522e953c734c3b6f23.
M +8 -8 clangparsejob.cpp
http://commits.kde.org/kdev-clang/26685277412343b0b4e99de90b798980da82ea67
diff --git a/clangparsejob.cpp b/clangparsejob.cpp
index 215e393..8b2dd61 100644
--- a/clangparsejob.cpp
+++ b/clangparsejob.cpp
@@ -151,6 +151,11 @@ ClangParsingEnvironmentFile* parsingEnvironmentFile(const \
TopDUContext* context)
return dynamic_cast<ClangParsingEnvironmentFile*>(context->parsingEnvironmentFile().data());
}
+bool hasTracker(const IndexedString& url)
+{
+ return ICore::self()->languageController()->backgroundParser()->trackerForUrl(url);
+}
+
}
ClangParseJob::ClangParseJob(const IndexedString& url, ILanguageSupport* \
languageSupport) @@ -314,23 +319,18 @@ void \
ClangParseJob::run(ThreadWeaver::JobPointer /*self*/, ThreadWeaver::Thread if \
(!context) { continue;
}
- const auto url = context->url();
- auto tracker = \
ICore::self()->languageController()->backgroundParser()->trackerForUrl(url); {
// prefer the editor modification revision, instead of the on-disk \
revision
- auto it = m_unsavedRevisions.find(url);
+ auto it = m_unsavedRevisions.find(context->url());
if (it != m_unsavedRevisions.end()) {
DUChainWriteLocker lock;
auto file = parsingEnvironmentFile(context);
Q_ASSERT(file);
file->setModificationRevision(it.value());
- if (tracker) {
- tracker->acquireRevision(it.value().revision);
- }
}
}
- if (tracker) {
- if (clang()->index()->translationUnitForUrl(url) == \
m_environment.translationUnitUrl()) { + if (::hasTracker(context->url())) {
+ if (clang()->index()->translationUnitForUrl(context->url()) == \
m_environment.translationUnitUrl()) {
// cache the parse session and the contained translation unit for \
this chain
// this then allows us to quickly reparse the document if it is \
changed by // the user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic