Commit 593d3955 authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Remove duplicated logging category

Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.ipc") is already in
clangbackendlogging.cpp.

Change-Id: If1afa6f266505e696ea00c6ca6bdf0751640784d
Reviewed-by: 's avatarDavid Schulz <david.schulz@qt.io>
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
parent d89bd9ff
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
static Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.ipc")
using namespace ClangBackEnd; using namespace ClangBackEnd;
namespace ClangCodeModel { namespace ClangCodeModel {
...@@ -50,8 +48,8 @@ static bool printAliveMessageHelper() ...@@ -50,8 +48,8 @@ static bool printAliveMessageHelper()
{ {
const bool print = qEnvironmentVariableIntValue("QTC_CLANG_FORCE_VERBOSE_ALIVE"); const bool print = qEnvironmentVariableIntValue("QTC_CLANG_FORCE_VERBOSE_ALIVE");
if (!print) { if (!print) {
qCDebug(log) << "Hint: AliveMessage will not be printed. " qCDebug(ipcLog) << "Hint: AliveMessage will not be printed. "
"Force it by setting QTC_CLANG_FORCE_VERBOSE_ALIVE=1."; "Force it by setting QTC_CLANG_FORCE_VERBOSE_ALIVE=1.";
} }
return print; return print;
...@@ -59,7 +57,7 @@ static bool printAliveMessageHelper() ...@@ -59,7 +57,7 @@ static bool printAliveMessageHelper()
static bool printAliveMessage() static bool printAliveMessage()
{ {
static bool print = log().isDebugEnabled() ? printAliveMessageHelper() : false; static bool print = ipcLog().isDebugEnabled() ? printAliveMessageHelper() : false;
return print; return print;
} }
...@@ -155,19 +153,20 @@ void BackendReceiver::reset() ...@@ -155,19 +153,20 @@ void BackendReceiver::reset()
void BackendReceiver::alive() void BackendReceiver::alive()
{ {
if (printAliveMessage()) if (printAliveMessage())
qCDebug(log) << "<<< AliveMessage"; qCDebug(ipcLog) << "<<< AliveMessage";
QTC_ASSERT(m_aliveHandler, return); QTC_ASSERT(m_aliveHandler, return);
m_aliveHandler(); m_aliveHandler();
} }
void BackendReceiver::echo(const EchoMessage &message) void BackendReceiver::echo(const EchoMessage &message)
{ {
qCDebug(log) << "<<<" << message; qCDebug(ipcLog) << "<<<" << message;
} }
void BackendReceiver::codeCompleted(const CodeCompletedMessage &message) void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
{ {
qCDebug(log) << "<<< CodeCompletedMessage with" << message.codeCompletions().size() << "items"; qCDebug(ipcLog) << "<<< CodeCompletedMessage with" << message.codeCompletions().size()
<< "items";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket)); QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket));
...@@ -179,10 +178,10 @@ void BackendReceiver::codeCompleted(const CodeCompletedMessage &message) ...@@ -179,10 +178,10 @@ void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
{ {
qCDebug(log) << "<<< DocumentAnnotationsChangedMessage with" qCDebug(ipcLog) << "<<< DocumentAnnotationsChangedMessage with"
<< message.diagnostics().size() << "diagnostics" << message.diagnostics().size() << "diagnostics"
<< message.tokenInfos().size() << "highlighting marks" << message.tokenInfos().size() << "highlighting marks"
<< message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges"; << message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges";
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath()); auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath());
...@@ -255,8 +254,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message) ...@@ -255,8 +254,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message)
void BackendReceiver::references(const ReferencesMessage &message) void BackendReceiver::references(const ReferencesMessage &message)
{ {
qCDebug(log) << "<<< ReferencesMessage with" qCDebug(ipcLog) << "<<< ReferencesMessage with"
<< message.references().size() << "references"; << message.references().size() << "references";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
const ReferencesEntry entry = m_referencesTable.take(ticket); const ReferencesEntry entry = m_referencesTable.take(ticket);
...@@ -273,8 +272,8 @@ void BackendReceiver::references(const ReferencesMessage &message) ...@@ -273,8 +272,8 @@ void BackendReceiver::references(const ReferencesMessage &message)
void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message) void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message)
{ {
qCDebug(log) << "<<< FollowSymbolMessage with" qCDebug(ipcLog) << "<<< FollowSymbolMessage with"
<< message.sourceRange() << "range"; << message.sourceRange() << "range";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket); QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket);
......
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