forked from qt-creator/qt-creator
CppTools: Use project part ids instead of file paths
File paths are not unique since e.g. each qbs group in a file is mapped to a project part. Change-Id: I7df3f224dd23046b869f2588b8a34eb26cfc0b1a Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -159,9 +159,9 @@ void ModelManagerSupportClang::onAbstractEditorSupportRemoved(const QString &fil
|
||||
{
|
||||
QTC_ASSERT(!filePath.isEmpty(), return);
|
||||
if (!cppModelManager()->cppEditorDocument(filePath)) {
|
||||
const QString projectFilePath = Utils::projectFilePathForFile(filePath);
|
||||
const QString projectPartId = Utils::projectPartIdForFile(filePath);
|
||||
m_ipcCommunicator.unregisterFilesForCodeCompletion(
|
||||
{ClangBackEnd::FileContainer(filePath, projectFilePath)});
|
||||
{ClangBackEnd::FileContainer(filePath, projectPartId)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,9 +173,9 @@ void ModelManagerSupportClang::onProjectPartsUpdated(ProjectExplorer::Project *p
|
||||
m_ipcCommunicator.registerProjectsParts(projectInfo.projectParts());
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onProjectPartsRemoved(const QStringList &projectFiles)
|
||||
void ModelManagerSupportClang::onProjectPartsRemoved(const QStringList &projectPartIds)
|
||||
{
|
||||
m_ipcCommunicator.unregisterProjectPartsForCodeCompletion(projectFiles);
|
||||
m_ipcCommunicator.unregisterProjectPartsForCodeCompletion(projectPartIds);
|
||||
}
|
||||
|
||||
#ifdef QT_TESTLIB_LIB
|
||||
|
||||
Reference in New Issue
Block a user