From 9cddeef036d95874b487f23e7c43895d45897766 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 23 Oct 2014 12:39:59 +0200 Subject: CppTools: Make use of QLoggingCategory ...for document processing and highlighting. Change-Id: I31d42a5a5010260643ec76688080fd14a486f7e3 Reviewed-by: Fawzi Mohamed --- src/plugins/cpptools/cppsourceprocessor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp') diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index 49b482da88..cd56dae3c9 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include /*! @@ -61,6 +62,8 @@ using namespace CppTools::Internal; typedef Document::DiagnosticMessage Message; +static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor") + namespace { inline QByteArray generateFingerPrint(const QList &definedMacros, const QByteArray &code) @@ -112,7 +115,6 @@ inline const Macro revision(const WorkingCopy &workingCopy, CppSourceProcessor::CppSourceProcessor(const Snapshot &snapshot, DocumentCallback documentFinished) : m_snapshot(snapshot), m_documentFinished(documentFinished), - m_dumpFileNameWhileParsing(false), m_preprocess(this, &m_env), m_revision(0), m_defaultCodec(Core::EditorManager::defaultTextCodec()) @@ -445,8 +447,7 @@ void CppSourceProcessor::sourceNeeded(unsigned line, const QString &fileName, In return; } - if (m_dumpFileNameWhileParsing) - qDebug() << "Parsing:" << absoluteFileName << "contents:" << contents.size() << "bytes"; + qCDebug(log) << "Parsing:" << absoluteFileName << "contents:" << contents.size() << "bytes"; Document::Ptr document = Document::create(absoluteFileName); document->setRevision(m_revision); -- cgit v1.2.1