ClangCodeModel: Make use of QLoggingCategory

Change-Id: I28d50e224803096c032ae6e387bf1346db4cc216
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-10-23 13:08:07 +02:00
parent 9cddeef036
commit bf3c55be42
7 changed files with 35 additions and 40 deletions

View File

@@ -35,17 +35,18 @@
#include <utils/runextensions.h>
#include <QCoreApplication>
#include <QLoggingCategory>
#include <QMutexLocker>
#include <QThreadPool>
#include <QDebug>
static const bool DebugTiming = qgetenv("QTC_CLANG_VERBOSE") == "1";
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
using namespace CppTools;
static Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.createmarkers")
CreateMarkers *CreateMarkers::create(SemanticMarker::Ptr semanticMarker,
const QString &fileName,
unsigned firstLine, unsigned lastLine)
@@ -79,11 +80,9 @@ void CreateMarkers::run()
if (isCanceled())
return;
QTime t;
if (DebugTiming) {
qDebug() << "*** Highlighting from" << m_firstLine << "to" << m_lastLine << "of" << m_fileName;
t.start();
}
qCDebug(log) << "Creating markers from" << m_firstLine << "to" << m_lastLine
<< "of" << m_fileName;
QTime t; t.start();
m_usages.clear();
@@ -105,10 +104,7 @@ void CreateMarkers::run()
flush();
reportFinished();
if (DebugTiming) {
qDebug() << "*** Highlighting took" << t.elapsed() << "ms in total.";
t.restart();
}
qCDebug(log) << "Creating markers took" << t.elapsed() << "ms in total.";
}
void CreateMarkers::addUse(const SourceMarker &marker)