Commit be1e0f7e authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: De-duplicate in Messages::registerMessages()

Change-Id: Id3c73249f562abd89de8e76290ea712c2fe7fae1
Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
parent ebce521e
...@@ -52,96 +52,49 @@ ...@@ -52,96 +52,49 @@
#include <QDataStream> #include <QDataStream>
template <typename T>
static void registerMetaType()
{
qRegisterMetaType<T>();
qRegisterMetaTypeStreamOperators<T>();
QMetaType::registerComparators<T>();
}
namespace ClangBackEnd { namespace ClangBackEnd {
void Messages::registerMessages() void Messages::registerMessages()
{ {
qRegisterMetaType<EndMessage>(); // Messages
qRegisterMetaTypeStreamOperators<EndMessage>(); registerMetaType<AliveMessage>();
QMetaType::registerComparators<EndMessage>(); registerMetaType<EchoMessage>();
registerMetaType<EndMessage>();
qRegisterMetaType<AliveMessage>();
qRegisterMetaTypeStreamOperators<AliveMessage>();
QMetaType::registerComparators<AliveMessage>();
qRegisterMetaType<EchoMessage>();
qRegisterMetaTypeStreamOperators<EchoMessage>();
qRegisterMetaType<RegisterTranslationUnitForEditorMessage>();
qRegisterMetaTypeStreamOperators<RegisterTranslationUnitForEditorMessage>();
QMetaType::registerComparators<RegisterTranslationUnitForEditorMessage>();
qRegisterMetaType<FileContainer>();
qRegisterMetaTypeStreamOperators<FileContainer>();
QMetaType::registerComparators<FileContainer>();
qRegisterMetaType<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaTypeStreamOperators<UnregisterTranslationUnitsForEditorMessage>();
QMetaType::registerComparators<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaType<CompleteCodeMessage>();
qRegisterMetaTypeStreamOperators<CompleteCodeMessage>();
QMetaType::registerComparators<CompleteCodeMessage>();
qRegisterMetaType<CodeCompletion>();
qRegisterMetaTypeStreamOperators<CodeCompletion>();
QMetaType::registerComparators<CodeCompletion>();
qRegisterMetaType<CodeCompletedMessage>();
qRegisterMetaTypeStreamOperators<CodeCompletedMessage>();
QMetaType::registerComparators<CodeCompletedMessage>();
qRegisterMetaType<RegisterProjectPartsForEditorMessage>();
qRegisterMetaTypeStreamOperators<RegisterProjectPartsForEditorMessage>();
QMetaType::registerComparators<RegisterProjectPartsForEditorMessage>();
qRegisterMetaType<ProjectPartContainer>();
qRegisterMetaTypeStreamOperators<ProjectPartContainer>();
QMetaType::registerComparators<ProjectPartContainer>();
qRegisterMetaType<UnregisterProjectPartsForEditorMessage>();
qRegisterMetaTypeStreamOperators<UnregisterProjectPartsForEditorMessage>();
QMetaType::registerComparators<UnregisterProjectPartsForEditorMessage>();
qRegisterMetaType<TranslationUnitDoesNotExistMessage>();
qRegisterMetaTypeStreamOperators<TranslationUnitDoesNotExistMessage>();
QMetaType::registerComparators<TranslationUnitDoesNotExistMessage>();
qRegisterMetaType<ProjectPartsDoNotExistMessage>();
qRegisterMetaTypeStreamOperators<ProjectPartsDoNotExistMessage>();
QMetaType::registerComparators<ProjectPartsDoNotExistMessage>();
qRegisterMetaType<DiagnosticsChangedMessage>();
qRegisterMetaTypeStreamOperators<DiagnosticsChangedMessage>();
QMetaType::registerComparators<DiagnosticsChangedMessage>();
qRegisterMetaType<DiagnosticContainer>(); registerMetaType<RegisterTranslationUnitForEditorMessage>();
qRegisterMetaTypeStreamOperators<DiagnosticContainer>(); registerMetaType<UpdateTranslationUnitsForEditorMessage>();
QMetaType::registerComparators<DiagnosticContainer>(); registerMetaType<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaType<SourceLocationContainer>(); registerMetaType<RegisterUnsavedFilesForEditorMessage>();
qRegisterMetaTypeStreamOperators<SourceLocationContainer>(); registerMetaType<UnregisterUnsavedFilesForEditorMessage>();
QMetaType::registerComparators<SourceLocationContainer>();
qRegisterMetaType<SourceRangeContainer>(); registerMetaType<RegisterProjectPartsForEditorMessage>();
qRegisterMetaTypeStreamOperators<SourceRangeContainer>(); registerMetaType<UnregisterProjectPartsForEditorMessage>();
QMetaType::registerComparators<SourceRangeContainer>();
qRegisterMetaType<RequestDiagnosticsMessage>(); registerMetaType<RequestDiagnosticsMessage>();
qRegisterMetaTypeStreamOperators<RequestDiagnosticsMessage>(); registerMetaType<DiagnosticsChangedMessage>();
QMetaType::registerComparators<RequestDiagnosticsMessage>();
qRegisterMetaType<RegisterUnsavedFilesForEditorMessage>(); registerMetaType<CompleteCodeMessage>();
qRegisterMetaTypeStreamOperators<RegisterUnsavedFilesForEditorMessage>(); registerMetaType<CodeCompletedMessage>();
QMetaType::registerComparators<RegisterUnsavedFilesForEditorMessage>(); registerMetaType<CodeCompletion>();
qRegisterMetaType<UnregisterUnsavedFilesForEditorMessage>(); registerMetaType<TranslationUnitDoesNotExistMessage>();
qRegisterMetaTypeStreamOperators<UnregisterUnsavedFilesForEditorMessage>(); registerMetaType<ProjectPartsDoNotExistMessage>();
QMetaType::registerComparators<UnregisterUnsavedFilesForEditorMessage>();
qRegisterMetaType<UpdateTranslationUnitsForEditorMessage>(); // Containers
qRegisterMetaTypeStreamOperators<UpdateTranslationUnitsForEditorMessage>(); registerMetaType<DiagnosticContainer>();
QMetaType::registerComparators<UpdateTranslationUnitsForEditorMessage>(); registerMetaType<FileContainer>();
registerMetaType<ProjectPartContainer>();
registerMetaType<SourceLocationContainer>();
registerMetaType<SourceRangeContainer>();
} }
} // namespace ClangBackEnd } // namespace ClangBackEnd
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment