diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-08-07 00:13:44 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-07 18:55:43 +0200 |
commit | bd7331cb3358087d9d3f787d39ce7aff5335d8c5 (patch) | |
tree | 9ed443089d9832e2e1ca0dcb91ee328f2c6796c2 /src | |
parent | bfabd0de511336abf50594b5e98f94d3eb36cb73 (diff) |
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 <stephen.kelly@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index adcd273f22..af0a510980 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; } |