Message info
 
To:kde-commits@kde.org From:Aleix Pol Subject:[kdevelop] projectmanagers/cmake: Limit project initialization, only let 1 project to be set up at a time. Date:Fri, 30 Mar 2012 17:50:37 +0200 (CEST)
 

Git commit 7e6c2e686a51577a8ea88cd3719969fc73ce46c7 by Aleix Pol.
Committed on 30/03/2012 at 17:42.
Pushed by apol into branch 'master'.

Limit project initialization, only let 1 project to be set up at a time.

Helps serialize the KConfig calls issued when the project import is bootstrapped.

BUG: 296348

M +2 -1 projectmanagers/cmake/cmakemanager.cpp

http://commits.kde.org/kdevelop/7e6c2e686a51577a8ea88cd3719969fc73ce46c7

diff --git a/projectmanagers/cmake/cmakemanager.cpp b/projectmanagers/cmake/cmakemanager.cpp
index 94428d2..9ae8f90 100644
--- a/projectmanagers/cmake/cmakemanager.cpp
+++ b/projectmanagers/cmake/cmakemanager.cpp
@@ -486,6 +486,7 @@ KUrl CMakeManager::buildDirectory(KDevelop::ProjectBaseItem *item) const

KDevelop::ReferencedTopDUContext CMakeManager::initializeProject(KDevelop::IProject* project)
{
+ QMutexLocker locker(&m_reparsingMutex);
KUrl baseUrl=CMake::projectRoot(project);

QPair<VariableMap,QStringList> initials = CMakeParserUtils::initialVariables();
@@ -1140,7 +1141,7 @@ void CMakeManager::dirtyFile(const QString & dirty)

if(p && dirtyFile.fileName() == "CMakeLists.txt")
{
- QMutexLocker locker(&m_reparsingMutex); //Maybe we should have a mutex per project
+ QMutexLocker locker(&m_reparsingMutex);

QList<ProjectFileItem*> files=p->filesForUrl(dirtyFile);
kDebug(9032) << dirtyFile << "is dirty" << files.count();