Commit 32762e27 authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Use more distinct ipc logging prefix

The previous "<<<" and ">>>" are visually hard to catch in the output.

Change-Id: I7313645454d92ca3534b19070173129676d49e18
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
parent 593d3955
......@@ -39,6 +39,8 @@
#include <utils/qtcassert.h>
#define qCDebugIpc() qCDebug(ipcLog) << "<===="
using namespace ClangBackEnd;
namespace ClangCodeModel {
......@@ -153,20 +155,20 @@ void BackendReceiver::reset()
void BackendReceiver::alive()
{
if (printAliveMessage())
qCDebug(ipcLog) << "<<< AliveMessage";
qCDebugIpc() << "AliveMessage";
QTC_ASSERT(m_aliveHandler, return);
m_aliveHandler();
}
void BackendReceiver::echo(const EchoMessage &message)
{
qCDebug(ipcLog) << "<<<" << message;
qCDebugIpc() << message;
}
void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
{
qCDebug(ipcLog) << "<<< CodeCompletedMessage with" << message.codeCompletions().size()
<< "items";
qCDebugIpc() << "CodeCompletedMessage with" << message.codeCompletions().size()
<< "items";
const quint64 ticket = message.ticketNumber();
QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket));
......@@ -178,10 +180,10 @@ void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
{
qCDebug(ipcLog) << "<<< DocumentAnnotationsChangedMessage with"
<< message.diagnostics().size() << "diagnostics"
<< message.tokenInfos().size() << "highlighting marks"
<< message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges";
qCDebugIpc() << "DocumentAnnotationsChangedMessage with"
<< message.diagnostics().size() << "diagnostics"
<< message.tokenInfos().size() << "highlighting marks"
<< message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges";
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath());
......@@ -254,8 +256,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message)
void BackendReceiver::references(const ReferencesMessage &message)
{
qCDebug(ipcLog) << "<<< ReferencesMessage with"
<< message.references().size() << "references";
qCDebugIpc() << "ReferencesMessage with"
<< message.references().size() << "references";
const quint64 ticket = message.ticketNumber();
const ReferencesEntry entry = m_referencesTable.take(ticket);
......@@ -272,8 +274,8 @@ void BackendReceiver::references(const ReferencesMessage &message)
void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message)
{
qCDebug(ipcLog) << "<<< FollowSymbolMessage with"
<< message.sourceRange() << "range";
qCDebugIpc() << "FollowSymbolMessage with"
<< message.sourceRange() << "range";
const quint64 ticket = message.ticketNumber();
QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket);
......
......@@ -32,6 +32,8 @@
#include <utils/qtcassert.h>
#define qCDebugIpc() qCDebug(ipcLog) << "====>"
using namespace ClangBackEnd;
namespace ClangCodeModel {
......@@ -44,91 +46,91 @@ BackendSender::BackendSender(ClangCodeModelConnectionClient *connectionClient)
void BackendSender::end()
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << ClangBackEnd::EndMessage();
qCDebugIpc() << ClangBackEnd::EndMessage();
m_connection->sendEndMessage();
}
void BackendSender::registerTranslationUnitsForEditor(const RegisterTranslationUnitForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().registerTranslationUnitsForEditor(message);
}
void BackendSender::updateTranslationUnitsForEditor(const UpdateTranslationUnitsForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().updateTranslationUnitsForEditor(message);
}
void BackendSender::unregisterTranslationUnitsForEditor(const UnregisterTranslationUnitsForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().unregisterTranslationUnitsForEditor(message);
}
void BackendSender::registerProjectPartsForEditor(const RegisterProjectPartsForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().registerProjectPartsForEditor(message);
}
void BackendSender::unregisterProjectPartsForEditor(const UnregisterProjectPartsForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().unregisterProjectPartsForEditor(message);
}
void BackendSender::registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().registerUnsavedFilesForEditor(message);
}
void BackendSender::unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().unregisterUnsavedFilesForEditor(message);
}
void BackendSender::completeCode(const CompleteCodeMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().completeCode(message);
}
void BackendSender::requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().requestDocumentAnnotations(message);
}
void BackendSender::requestReferences(const RequestReferencesMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().requestReferences(message);
}
void BackendSender::requestFollowSymbol(const RequestFollowSymbolMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().requestFollowSymbol(message);
}
void BackendSender::updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message)
{
QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message;
qCDebugIpc() << message;
m_connection->serverProxy().updateVisibleTranslationUnits(message);
}
......
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