forked from qt-creator/qt-creator
Debugger: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
And instead of qgetenv. Takes Qt Creator's setting at "Environment > System > Environment" into account, which makes it easier on some platforms to set them (e.g. macOS), can be configured differently in different settings paths, and potentially can be changed at runtime (depending on usage). Change-Id: I3ea7623fb528e13a202afa2f89b00e5ee83962d8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -2599,7 +2600,8 @@ void GdbEngine::insertBreakpoint(const Breakpoint &bp)
|
||||
}
|
||||
|
||||
// for dumping of expressions
|
||||
const static bool alwaysVerbose = qEnvironmentVariableIsSet("QTC_DEBUGGER_PYTHON_VERBOSE");
|
||||
const bool alwaysVerbose = qtcEnvironmentVariableIsSet(
|
||||
"QTC_DEBUGGER_PYTHON_VERBOSE");
|
||||
const DebuggerSettings &s = *debuggerSettings();
|
||||
cmd.arg("passexceptions", alwaysVerbose);
|
||||
cmd.arg("fancy", s.useDebuggingHelpers.value());
|
||||
@@ -3810,7 +3812,7 @@ void GdbEngine::setupEngine()
|
||||
gdbCommand.addArg("--tty=" + m_outputCollector.serverName());
|
||||
}
|
||||
|
||||
const QStringList testList = QString::fromLocal8Bit(qgetenv("QTC_DEBUGGER_TESTS")).split(',');
|
||||
const QStringList testList = qtcEnvironmentVariable("QTC_DEBUGGER_TESTS").split(',');
|
||||
for (const QString &test : testList)
|
||||
m_testCases.insert(test.toInt());
|
||||
for (int test : qAsConst(m_testCases))
|
||||
@@ -5044,7 +5046,7 @@ void GdbEngine::doUpdateLocals(const UpdateParameters ¶ms)
|
||||
watchHandler()->appendFormatRequests(&cmd);
|
||||
watchHandler()->appendWatchersAndTooltipRequests(&cmd);
|
||||
|
||||
const static bool alwaysVerbose = qEnvironmentVariableIsSet("QTC_DEBUGGER_PYTHON_VERBOSE");
|
||||
const bool alwaysVerbose = qtcEnvironmentVariableIsSet("QTC_DEBUGGER_PYTHON_VERBOSE");
|
||||
const DebuggerSettings &s = *debuggerSettings();
|
||||
cmd.arg("passexceptions", alwaysVerbose);
|
||||
cmd.arg("fancy", s.useDebuggingHelpers.value());
|
||||
|
||||
Reference in New Issue
Block a user