QLayout: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I355cd4ce9d0e1a56f1b40a340953d6a4b4a58629 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
parent
25d6f312ac
commit
a12cc29cf5
@ -810,7 +810,7 @@ static bool layoutDebug()
|
|||||||
{
|
{
|
||||||
static int checked_env = -1;
|
static int checked_env = -1;
|
||||||
if(checked_env == -1)
|
if(checked_env == -1)
|
||||||
checked_env = !!qgetenv("QT_LAYOUT_DEBUG").toInt();
|
checked_env = !!qEnvironmentVariableIntValue("QT_LAYOUT_DEBUG");
|
||||||
|
|
||||||
return checked_env;
|
return checked_env;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user