Fix a clazy warning about qgetenv

Fix the following warning:
qgetenv().toInt() is slow. Use qEnvironmentVariableIntValue()
instead [clazy-qgetenv].

Change-Id: Ifb5d3869e758f8c42bb9f34004d9c04d5dbb4d89
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2020-11-17 16:58:31 +01:00
parent 2422a90f1e
commit c3a8429dc8

View File

@@ -973,7 +973,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
m_runParameters.toolChainAbi = ToolChainKitAspect::targetAbi(kit); m_runParameters.toolChainAbi = ToolChainKitAspect::targetAbi(kit);
bool ok = false; bool ok = false;
int nativeMixedOverride = qgetenv("QTC_DEBUGGER_NATIVE_MIXED").toInt(&ok); const int nativeMixedOverride = qEnvironmentVariableIntValue("QTC_DEBUGGER_NATIVE_MIXED", &ok);
if (ok) if (ok)
m_runParameters.nativeMixedEnabled = bool(nativeMixedOverride); m_runParameters.nativeMixedEnabled = bool(nativeMixedOverride);