Commit 0d84603c authored by Nikolai Kosjar's avatar Nikolai Kosjar

CodeModel(s): Unify name/values of accessed environment variables

Format: QTC_*=(1|0).

Now it's easier to change them in the Run Configuration of Qt Creator.

Change-Id: Ifc45cecb89b33a31942b4c3e2d03851a1d72d0bf
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 311868a6
......@@ -60,7 +60,7 @@
#include <QTextCursor>
#include <QTextDocument>
static const bool DebugTiming = !qgetenv("QTC_CLANG_VERBOSE").isEmpty();
static const bool DebugTiming = qgetenv("QTC_CLANG_VERBOSE") == "1";
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
......
......@@ -45,7 +45,7 @@ using namespace ClangCodeModel::Internal;
using namespace Core;
using namespace CppTools;
static const bool BeVerbose = !qgetenv("QTC_CLANG_VERBOSE").isEmpty();
static const bool BeVerbose = qgetenv("QTC_CLANG_VERBOSE") == "1";
namespace ClangCodeModel {
namespace Utils {
......
......@@ -41,7 +41,7 @@
#include <QDebug>
static const bool DebugTiming = !qgetenv("QTC_CLANG_VERBOSE").isEmpty();
static const bool DebugTiming = qgetenv("QTC_CLANG_VERBOSE") == "1";
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
......
......@@ -47,7 +47,7 @@ static QBasicAtomicInt unitDataCount = Q_BASIC_ATOMIC_INITIALIZER(0);
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
static const int DisplayDiagnostics = qgetenv("QTC_CLANG_VERBOSE").isEmpty() ? 0 : 1;
static const int DisplayDiagnostics = (qgetenv("QTC_CLANG_VERBOSE") == "1") ? 1 : 0;
Unit::Unit()
: m_index(0)
......
......@@ -16,6 +16,8 @@
using namespace CppTools;
using namespace CppTools::Internal;
static const bool DumpFileNameWhileParsing = qgetenv("QTC_DUMP_FILENAME_WHILE_PARSING") == "1";
namespace {
static void parse(QFutureInterface<void> &future,
......@@ -171,7 +173,7 @@ BuiltinIndexingSupport::BuiltinIndexingSupport()
: m_revision(0)
{
m_synchronizer.setCancelOnWait(true);
m_dumpFileNameWhileParsing = !qgetenv("QTCREATOR_DUMP_FILENAME_WHILE_PARSING").isNull();
m_dumpFileNameWhileParsing = DumpFileNameWhileParsing;
}
BuiltinIndexingSupport::~BuiltinIndexingSupport()
......
......@@ -60,6 +60,8 @@
#include <sstream>
#endif
static const bool DumpProjectInfo = qgetenv("QTC_DUMP_PROJECT_INFO") == "1";
namespace CppTools {
uint qHash(const ProjectPart &p)
......@@ -245,7 +247,7 @@ CppModelManager::CppModelManager(QObject *parent)
this, SIGNAL(globalSnapshotChanged()));
m_findReferences = new CppFindReferences(this);
m_indexerEnabled = qgetenv("QTCREATOR_NO_CODE_INDEXER").isNull();
m_indexerEnabled = qgetenv("QTC_NO_CODE_INDEXER") != "1";
m_dirty = true;
......@@ -782,7 +784,7 @@ QFuture<void> CppModelManager::updateProjectInfo(const ProjectInfo &newProjectIn
} // Mutex scope
// If requested, dump everything we got
if (!qgetenv("QTCREATOR_DUMP_PROJECT_INFO").isEmpty())
if (DumpProjectInfo)
dumpModelManagerConfiguration();
// Remove files from snapshot that are not reachable any more
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment