summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanager.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2018-10-10 14:32:00 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2018-10-16 06:40:43 +0000
commitd67ddfb5d1c1d60a2ba06774d90f2ba14432e592 (patch)
tree96d4b133da62ed05fbecc86f87061653209c98d4 /src/plugins/cpptools/cppmodelmanager.cpp
parent3f3ba92fe99935dd44408076511e5d6fde603c74 (diff)
downloadqt-creator-d67ddfb5d1c1d60a2ba06774d90f2ba14432e592.tar.gz
Clang: Avoid starting backend jobs for inactive app and during VCS operations
...to reduce file locking on Windows caused by clangbackend's parse/reparse jobs. Considering inactive application state should help for external VCS operations, e.g. on the command line. However, activating Qt Creator while such a VCS operation runs might still lead to undesired behavior, but this should be the less common case. VCS operations started from within Qt Creator should see less locking conflicts as we know when they start and finish. However, we just avoid starting new jobs - there might be still jobs running. Pending or new jobs will be started once Qt Creator is activated again and all VCS operations finished. Task-number: QTCREATORBUG-15449 Change-Id: I5f04c34f006e66162368efbdd58bd822a706f35e Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 5db9dd601d..603ff3174b 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -1326,6 +1326,11 @@ void CppModelManager::renameIncludes(const QString &oldFileName, const QString &
}
}
+void CppModelManager::setBackendJobsPostponed(bool postponed)
+{
+ d->m_activeModelManagerSupport->setBackendJobsPostponed(postponed);
+}
+
void CppModelManager::onCoreAboutToClose()
{
Core::ProgressManager::cancelTasks(CppTools::Constants::TASK_INDEX);