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

@@ -41,6 +41,7 @@
#include <QDir>
#include <QFile>
#include <QLoggingCategory>
#include <QSet>
#include <QString>
@@ -49,11 +50,11 @@ using namespace ClangCodeModel::Internal;
using namespace Core;
using namespace CppTools;
static const bool BeVerbose = qgetenv("QTC_CLANG_VERBOSE") == "1";
namespace ClangCodeModel {
namespace Utils {
Q_LOGGING_CATEGORY(verboseRunLog, "qtc.clangcodemodel.verboserun")
namespace {
bool isBlacklisted(const QString &path)
{
@@ -139,7 +140,7 @@ QStringList createClangOptions(const ProjectPart::Ptr &pPart, ProjectFile::Kind
if (pPart.isNull())
return result;
if (BeVerbose)
if (verboseRunLog().isDebugEnabled())
result << QLatin1String("-v");
const bool objcExt = pPart->languageExtensions & ProjectPart::ObjectiveCExtensions;