forked from qt-creator/qt-creator
GenericProjectManager: Clean up code
Remove unused code and cancel any running indexing. Change-Id: I1afbd6e4e041224e36c715242b8be31991259e86 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -265,22 +265,7 @@ void GenericProject::refresh(RefreshOptions options)
|
|||||||
foreach (const QString &file, files())
|
foreach (const QString &file, files())
|
||||||
adder.maybeAdd(file);
|
adder.maybeAdd(file);
|
||||||
|
|
||||||
QStringList filesToUpdate;
|
m_codeModelFuture.cancel();
|
||||||
|
|
||||||
if (options & Configuration) {
|
|
||||||
foreach (const CppTools::ProjectFile &file, part->files)
|
|
||||||
filesToUpdate << file.path;
|
|
||||||
filesToUpdate.append(CppTools::CppModelManagerInterface::configurationFileName());
|
|
||||||
// Full update, if there's a code model update, cancel it
|
|
||||||
m_codeModelFuture.cancel();
|
|
||||||
} else if (options & Files) {
|
|
||||||
// Only update files that got added to the list
|
|
||||||
QSet<QString> newFileList;
|
|
||||||
foreach (const CppTools::ProjectFile &file, part->files)
|
|
||||||
newFileList.insert(file.path);
|
|
||||||
newFileList.subtract(oldFileList);
|
|
||||||
filesToUpdate.append(newFileList.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
pinfo.appendProjectPart(part);
|
pinfo.appendProjectPart(part);
|
||||||
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !part->files.isEmpty());
|
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !part->files.isEmpty());
|
||||||
|
Reference in New Issue
Block a user