aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/semantichighlighter.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-10-23 12:39:59 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-11-03 12:11:01 +0100
commit9cddeef036d95874b487f23e7c43895d45897766 (patch)
tree85b40df839d33ea78ec9028367a2b5ce8d3677bc /src/plugins/cpptools/semantichighlighter.cpp
parent8d6b43bc2af7ad6797c818a5a4eb50499e653ca3 (diff)
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/semantichighlighter.cpp')
-rw-r--r--src/plugins/cpptools/semantichighlighter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/cpptools/semantichighlighter.cpp b/src/plugins/cpptools/semantichighlighter.cpp
index 8e59896300..baf7940afe 100644
--- a/src/plugins/cpptools/semantichighlighter.cpp
+++ b/src/plugins/cpptools/semantichighlighter.cpp
@@ -35,12 +35,14 @@
#include <utils/qtcassert.h>
-enum { debug = 0 };
+#include <QLoggingCategory>
using namespace CPlusPlus;
using TextEditor::SemanticHighlighter::incrementalApplyExtraAdditionalFormats;
using TextEditor::SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd;
+static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter")
+
namespace CppTools {
SemanticHighlighter::SemanticHighlighter(TextEditor::TextDocument *baseTextDocument)
@@ -74,8 +76,7 @@ void SemanticHighlighter::run()
{
QTC_ASSERT(m_highlightingRunner, return);
- if (debug)
- qDebug() << "SemanticHighlighter: run()";
+ qCDebug(log) << "SemanticHighlighter: run()";
if (m_watcher) {
disconnectWatcher();
@@ -101,8 +102,7 @@ void SemanticHighlighter::onHighlighterResultAvailable(int from, int to)
else if (!m_watcher || m_watcher->isCanceled())
return; // aborted
- if (debug)
- qDebug() << "SemanticHighlighter: onHighlighterResultAvailable()" << from << to;
+ qCDebug(log) << "onHighlighterResultAvailable()" << from << to;
TextEditor::SyntaxHighlighter *highlighter = m_baseTextDocument->syntaxHighlighter();
QTC_ASSERT(highlighter, return);
@@ -116,8 +116,7 @@ void SemanticHighlighter::onHighlighterFinished()
TextEditor::SyntaxHighlighter *highlighter = m_baseTextDocument->syntaxHighlighter();
QTC_CHECK(highlighter);
if (highlighter) {
- if (debug)
- qDebug() << "SemanticHighlighter: onHighlighterFinished() - clearing formats";
+ qCDebug(log) << "onHighlighterFinished() - clearing formats";
clearExtraAdditionalFormatsUntilEnd(highlighter, m_watcher->future());
}
}