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 @@
#include <QDataStream>
template <typename T>
static void registerMetaType()
{
qRegisterMetaType<T>();
qRegisterMetaTypeStreamOperators<T>();
QMetaType::registerComparators<T>();
}
namespace ClangBackEnd {
void Messages::registerMessages()
{
qRegisterMetaType<EndMessage>();
qRegisterMetaTypeStreamOperators<EndMessage>();
QMetaType::registerComparators<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>();
// Messages
registerMetaType<AliveMessage>();
registerMetaType<EchoMessage>();
registerMetaType<EndMessage>();
qRegisterMetaType<DiagnosticContainer>();
qRegisterMetaTypeStreamOperators<DiagnosticContainer>();
QMetaType::registerComparators<DiagnosticContainer>();
registerMetaType<RegisterTranslationUnitForEditorMessage>();
registerMetaType<UpdateTranslationUnitsForEditorMessage>();
registerMetaType<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaType<SourceLocationContainer>();
qRegisterMetaTypeStreamOperators<SourceLocationContainer>();
QMetaType::registerComparators<SourceLocationContainer>();
registerMetaType<RegisterUnsavedFilesForEditorMessage>();
registerMetaType<UnregisterUnsavedFilesForEditorMessage>();
qRegisterMetaType<SourceRangeContainer>();
qRegisterMetaTypeStreamOperators<SourceRangeContainer>();
QMetaType::registerComparators<SourceRangeContainer>();
registerMetaType<RegisterProjectPartsForEditorMessage>();
registerMetaType<UnregisterProjectPartsForEditorMessage>();
qRegisterMetaType<RequestDiagnosticsMessage>();
qRegisterMetaTypeStreamOperators<RequestDiagnosticsMessage>();
QMetaType::registerComparators<RequestDiagnosticsMessage>();
registerMetaType<RequestDiagnosticsMessage>();
registerMetaType<DiagnosticsChangedMessage>();
qRegisterMetaType<RegisterUnsavedFilesForEditorMessage>();
qRegisterMetaTypeStreamOperators<RegisterUnsavedFilesForEditorMessage>();
QMetaType::registerComparators<RegisterUnsavedFilesForEditorMessage>();
registerMetaType<CompleteCodeMessage>();
registerMetaType<CodeCompletedMessage>();
registerMetaType<CodeCompletion>();
qRegisterMetaType<UnregisterUnsavedFilesForEditorMessage>();
qRegisterMetaTypeStreamOperators<UnregisterUnsavedFilesForEditorMessage>();
QMetaType::registerComparators<UnregisterUnsavedFilesForEditorMessage>();
registerMetaType<TranslationUnitDoesNotExistMessage>();
registerMetaType<ProjectPartsDoNotExistMessage>();
qRegisterMetaType<UpdateTranslationUnitsForEditorMessage>();
qRegisterMetaTypeStreamOperators<UpdateTranslationUnitsForEditorMessage>();
QMetaType::registerComparators<UpdateTranslationUnitsForEditorMessage>();
// Containers
registerMetaType<DiagnosticContainer>();
registerMetaType<FileContainer>();
registerMetaType<ProjectPartContainer>();
registerMetaType<SourceLocationContainer>();
registerMetaType<SourceRangeContainer>();
}
} // 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