forked from qt-creator/qt-creator
Clang: Update the fallback project part
Change-Id: I1dfbb32246798a402a1efe18529e95d6199ba942 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -336,7 +336,7 @@ static QVector<ClangBackEnd::ProjectPartContainer> toProjectPartContainers(
|
||||
return projectPartContainers;
|
||||
}
|
||||
|
||||
void IpcCommunicator::registerEmptyProjectForProjectLessFiles()
|
||||
void IpcCommunicator::registerFallbackProjectPart()
|
||||
{
|
||||
QTC_CHECK(m_connection.isConnected());
|
||||
|
||||
@@ -524,7 +524,7 @@ void IpcCommunicator::onCoreAboutToClose()
|
||||
|
||||
void IpcCommunicator::initializeBackendWithCurrentData()
|
||||
{
|
||||
registerEmptyProjectForProjectLessFiles();
|
||||
registerFallbackProjectPart();
|
||||
registerCurrentProjectParts();
|
||||
registerCurrentCppEditorDocuments();
|
||||
registerCurrentCodeModelUiHeaders();
|
||||
|
||||
@@ -144,6 +144,8 @@ public:
|
||||
void requestDiagnostics(Core::IDocument *document);
|
||||
void updateChangeContentStartPosition(const QString &filePath, int position);
|
||||
|
||||
void registerFallbackProjectPart();
|
||||
|
||||
public: // for tests
|
||||
IpcSenderInterface *setIpcSender(IpcSenderInterface *ipcSender);
|
||||
void killBackendProcess();
|
||||
@@ -156,7 +158,6 @@ private:
|
||||
|
||||
void initializeBackend();
|
||||
void initializeBackendWithCurrentData();
|
||||
void registerEmptyProjectForProjectLessFiles();
|
||||
void registerCurrentProjectParts();
|
||||
void registerCurrentCppEditorDocuments();
|
||||
void registerCurrentCodeModelUiHeaders();
|
||||
|
||||
@@ -300,7 +300,9 @@ void ModelManagerSupportClang::onProjectPartsUpdated(ProjectExplorer::Project *p
|
||||
QTC_ASSERT(project, return);
|
||||
const CppTools::ProjectInfo projectInfo = cppModelManager()->projectInfo(project);
|
||||
QTC_ASSERT(projectInfo.isValid(), return);
|
||||
|
||||
m_ipcCommunicator.registerProjectsParts(projectInfo.projectParts());
|
||||
m_ipcCommunicator.registerFallbackProjectPart();
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onProjectPartsRemoved(const QStringList &projectPartIds)
|
||||
@@ -308,6 +310,7 @@ void ModelManagerSupportClang::onProjectPartsRemoved(const QStringList &projectP
|
||||
if (!projectPartIds.isEmpty()) {
|
||||
unregisterTranslationUnitsWithProjectParts(projectPartIds);
|
||||
m_ipcCommunicator.unregisterProjectPartsForEditor(projectPartIds);
|
||||
m_ipcCommunicator.registerFallbackProjectPart();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user