forked from qt-creator/qt-creator
Clang: Add UpdateTranslationUnitsForEditorMessage
If an editor is changing all translation units independent of their project part they must be updated too. So we introduce a new message to update all translation units with the same file path. Change-Id: I70d0ea2bbca9fa880111ff7219573e54f3277026 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "registerunsavedfilesforeditormessage.h"
|
||||
#include "requestdiagnosticsmessage.h"
|
||||
#include "unregisterunsavedfilesforeditormessage.h"
|
||||
#include "updatetranslationunitsforeditormessage.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QVariant>
|
||||
@@ -48,6 +49,7 @@ void IpcServerInterface::dispatch(const QVariant &message)
|
||||
{
|
||||
static const int endMessageType = QMetaType::type("ClangBackEnd::EndMessage");
|
||||
static const int registerTranslationUnitsForEditorMessageType = QMetaType::type("ClangBackEnd::RegisterTranslationUnitForEditorMessage");
|
||||
static const int updateTranslationUnitsForEditorMessageType = QMetaType::type("ClangBackEnd::UpdateTranslationUnitsForEditorMessage");
|
||||
static const int unregisterTranslationUnitsForEditorMessageType = QMetaType::type("ClangBackEnd::UnregisterTranslationUnitsForEditorMessage");
|
||||
static const int registerProjectPartsForEditorMessageType = QMetaType::type("ClangBackEnd::RegisterProjectPartsForEditorMessage");
|
||||
static const int unregisterProjectPartsForEditorMessageType = QMetaType::type("ClangBackEnd::UnregisterProjectPartsForEditorMessage");
|
||||
@@ -62,6 +64,8 @@ void IpcServerInterface::dispatch(const QVariant &message)
|
||||
end();
|
||||
else if (type == registerTranslationUnitsForEditorMessageType)
|
||||
registerTranslationUnitsForEditor(message.value<RegisterTranslationUnitForEditorMessage>());
|
||||
else if (type == updateTranslationUnitsForEditorMessageType)
|
||||
updateTranslationUnitsForEditor(message.value<UpdateTranslationUnitsForEditorMessage>());
|
||||
else if (type == unregisterTranslationUnitsForEditorMessageType)
|
||||
unregisterTranslationUnitsForEditor(message.value<UnregisterTranslationUnitsForEditorMessage>());
|
||||
else if (type == registerProjectPartsForEditorMessageType)
|
||||
|
||||
Reference in New Issue
Block a user