summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-08-07 00:13:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-07 18:55:43 +0200
commitbd7331cb3358087d9d3f787d39ce7aff5335d8c5 (patch)
tree9ed443089d9832e2e1ca0dcb91ee328f2c6796c2
parentbfabd0de511336abf50594b5e98f94d3eb36cb73 (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>
-rw-r--r--src/gui/text/qfontengine_ft.cpp3
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;
}