summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-03-06 14:42:01 -0300
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-03-26 15:57:21 +0100
commit0d84603c41cb1e2b9afead49bd7777c856da377f (patch)
tree9f92cd2da2e5a64ee69fbd8798dbfb37e1ddc9b8 /src/plugins/cpptools
parent311868a6966ce281910255cb2d5f42858dd2be08 (diff)
downloadqt-creator-0d84603c41cb1e2b9afead49bd7777c856da377f.tar.gz
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: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r--src/plugins/cpptools/builtinindexingsupport.cpp4
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp
index 51c3bde556..99f3974e53 100644
--- a/src/plugins/cpptools/builtinindexingsupport.cpp
+++ b/src/plugins/cpptools/builtinindexingsupport.cpp
@@ -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()
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 640e8bfa07..1312a2ab31 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -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