diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2014-10-23 12:39:59 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2014-11-03 12:11:01 +0100 |
commit | 9cddeef036d95874b487f23e7c43895d45897766 (patch) | |
tree | 85b40df839d33ea78ec9028367a2b5ce8d3677bc /src/plugins/cpptools/cppsourceprocessor.cpp | |
parent | 8d6b43bc2af7ad6797c818a5a4eb50499e653ca3 (diff) | |
download | qt-creator-9cddeef036d95874b487f23e7c43895d45897766.tar.gz |
CppTools: Make use of QLoggingCategory
...for document processing and highlighting.
Change-Id: I31d42a5a5010260643ec76688080fd14a486f7e3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp')
-rw-r--r-- | src/plugins/cpptools/cppsourceprocessor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <QCoreApplication> #include <QCryptographicHash> #include <QDir> +#include <QLoggingCategory> #include <QTextCodec> /*! @@ -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<Macro> &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); |