From bd7331cb3358087d9d3f787d39ce7aff5335d8c5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 7 Aug 2012 00:13:44 +0200 Subject: [PATCH] QtGui: collapse two qgetenv() on the same variable Store the result in a temporary QByteArray and continue working with that one. Change-Id: I24bc243f0f3dfb37d840faf7592b3383bd37c7e2 Reviewed-by: Stephen Kelly Reviewed-by: Gunnar Sletta Reviewed-by: Thiago Macieira --- src/gui/text/qfontengine_ft.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index adcd273f22d..af0a510980d 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -636,7 +636,8 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd) #endif defaultFormat = Format_None; embeddedbitmap = false; - cacheEnabled = qgetenv("QT_NO_FT_CACHE").isEmpty() || qgetenv("QT_NO_FT_CACHE").toInt() == 0; + const QByteArray env = qgetenv("QT_NO_FT_CACHE"); + cacheEnabled = env.isEmpty() || env.toInt() == 0; m_subPixelPositionCount = 4; }