diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 069b8e6c9dd82379e3fff4edf5bd3d7b9baacbee..d374f813d75ba9630bcca4bb67f9ed8ec8cff0bf 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -781,8 +781,8 @@ CppModelManager::WorkingCopy CppModelManager::workingCopy() const
     return const_cast<CppModelManager *>(this)->buildWorkingCopyList();
 }
 
-void CppModelManager::updateSourceFiles(const QStringList &sourceFiles)
-{ (void) refreshSourceFiles(sourceFiles); }
+QFuture<void> CppModelManager::updateSourceFiles(const QStringList &sourceFiles)
+{ return refreshSourceFiles(sourceFiles); }
 
 QList<CppModelManager::ProjectInfo> CppModelManager::projectInfos() const
 {
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h
index c6369f10f278745daa4821c3aeb59277d526e8fe..d77ba3c0a7a6118b7539d8582b72be99c1ba3198 100644
--- a/src/plugins/cpptools/cppmodelmanager.h
+++ b/src/plugins/cpptools/cppmodelmanager.h
@@ -87,7 +87,7 @@ public:
     CppModelManager(QObject *parent);
     virtual ~CppModelManager();
 
-    virtual void updateSourceFiles(const QStringList &sourceFiles);
+    virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles);
     virtual WorkingCopy workingCopy() const;
 
     virtual QList<ProjectInfo> projectInfos() const;
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h
index a08d874252ae6728044db82bdd9e309ae2548330..771340dc8edab226b0b530aefb95b6f05dff2095 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.h
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.h
@@ -36,6 +36,7 @@
 #include <QtCore/QHash>
 #include <QtCore/QPointer>
 #include <QtCore/QStringList>
+#include <QtCore/QFuture>
 
 namespace ProjectExplorer {
     class Project;
@@ -128,7 +129,7 @@ public:
 
 public Q_SLOTS:
     void updateModifiedSourceFiles();
-    virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
+    virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles) = 0;
     virtual void GC() = 0;
 };
 
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 68b7dc9b3711d3b8d4029cbb97a64007e0a7bb24..47ced1bdf3c622d4da8838d291221602fed1387f 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -403,7 +403,7 @@ void Qt4Project::updateCodeModel()
     if (debug)
         qDebug()<<"Qt4Project::updateCodeModel()";
 
-    // TODO cancel still running indexing
+    m_codeModelFuture.cancel();
 
     if (!activeTarget() || !activeTarget()->activeBuildConfiguration())
         return;
@@ -576,7 +576,7 @@ void Qt4Project::updateCodeModel()
         pinfo.precompiledHeaders = allPrecompileHeaders;
 
         modelmanager->updateProjectInfo(pinfo);
-        modelmanager->updateSourceFiles(pinfo.sourceFiles);
+        m_codeModelFuture = modelmanager->updateSourceFiles(pinfo.sourceFiles);
     }
 }
 
diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h
index f4d9d48cea468a5d07871c09ba30184fa8399dcb..7846370d3bc0224d13352bd06b72759c3f7566a8 100644
--- a/src/plugins/qt4projectmanager/qt4project.h
+++ b/src/plugins/qt4projectmanager/qt4project.h
@@ -235,6 +235,7 @@ private:
     QList<Internal::Qt4ProFileNode *> m_partialEvaluate;
 
     QMap<QString, Internal::CodeModelInfo> m_codeModelInfo;
+    QFuture<void> m_codeModelFuture;
 
     friend class Qt4ProjectFile;
     friend class Internal::Qt4ProjectConfigWidget;