From 31f61592e480dfd473e1591f2609bd37c8bb0d4c Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 3 Jan 2018 14:18:08 +0100 Subject: [PATCH] Clang: Inline some functions Change-Id: I923919f206f038cf8cedf709b4047cbc22a990ee Reviewed-by: Ivan Donchevskii --- .../clangbackend/source/clangcodemodelserver.cpp | 16 +++------------- .../clangbackend/source/clangcodemodelserver.h | 3 --- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/tools/clangbackend/source/clangcodemodelserver.cpp b/src/tools/clangbackend/source/clangcodemodelserver.cpp index 20a6e65920f..5e94f93bb34 100644 --- a/src/tools/clangbackend/source/clangcodemodelserver.cpp +++ b/src/tools/clangbackend/source/clangcodemodelserver.cpp @@ -66,13 +66,14 @@ ClangCodeModelServer::ClangCodeModelServer() QObject::connect(&updateVisibleButNotCurrentDocumentsTimer, &QTimer::timeout, [this]() { - processJobsForDirtyAndVisibleButNotCurrentDocuments(); + addAndRunUpdateJobs(documents.dirtyAndVisibleButNotCurrentDocuments()); }); QObject::connect(documents.clangFileSystemWatcher(), &ClangFileSystemWatcher::fileChanged, [this](const Utf8String &filePath) { - ClangCodeModelServer::startDocumentAnnotationsTimerIfFileIsNotOpenAsDocument(filePath); + if (!documents.hasDocumentWithFilePath(filePath)) + updateDocumentAnnotationsTimer.start(0); }); } @@ -308,12 +309,6 @@ const Documents &ClangCodeModelServer::documentsForTestOnly() const return documents; } -void ClangCodeModelServer::startDocumentAnnotationsTimerIfFileIsNotOpenAsDocument(const Utf8String &filePath) -{ - if (!documents.hasDocumentWithFilePath(filePath)) - updateDocumentAnnotationsTimer.start(0); -} - QList ClangCodeModelServer::runningJobsForTestsOnly() { return documentProcessors().runningJobs(); @@ -375,11 +370,6 @@ void ClangCodeModelServer::processTimerForVisibleButNotCurrentDocuments() } } -void ClangCodeModelServer::processJobsForDirtyAndVisibleButNotCurrentDocuments() -{ - addAndRunUpdateJobs(documents.dirtyAndVisibleButNotCurrentDocuments()); -} - void ClangCodeModelServer::processSuspendResumeJobs(const std::vector &documents) { const SuspendResumeJobs suspendResumeJobs = createSuspendResumeJobs(documents); diff --git a/src/tools/clangbackend/source/clangcodemodelserver.h b/src/tools/clangbackend/source/clangcodemodelserver.h index 5e9e2934a69..1591d25743c 100644 --- a/src/tools/clangbackend/source/clangcodemodelserver.h +++ b/src/tools/clangbackend/source/clangcodemodelserver.h @@ -72,13 +72,10 @@ public: // for tests DocumentProcessors &documentProcessors(); private: - void startDocumentAnnotationsTimerIfFileIsNotOpenAsDocument(const Utf8String &filePath); - void processInitialJobsForDocuments(const std::vector &documents); void processJobsForDirtyAndVisibleDocuments(); void processJobsForDirtyCurrentDocument(); void processTimerForVisibleButNotCurrentDocuments(); - void processJobsForDirtyAndVisibleButNotCurrentDocuments(); void processSuspendResumeJobs(const std::vector &documents); void addAndRunUpdateJobs(std::vector documents);