summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-07-01 11:07:50 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-07-01 11:07:50 (GMT)
commit3f531c0541cb885a73f2f221b53772e9483b71d2 (patch)
tree6968cd683c459d59fb79bfe0f4ed991db28460ba /src/gui
parentcc0350b2a2676ac48e9c8c7a995dbb18393febc3 (diff)
downloadQt-3f531c0541cb885a73f2f221b53772e9483b71d2.zip
Qt-3f531c0541cb885a73f2f221b53772e9483b71d2.tar.gz
Qt-3f531c0541cb885a73f2f221b53772e9483b71d2.tar.bz2
minor optimization
use the cached data from fileinfo rather than re-creating it one line later Merge-request: 1260 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine_qpf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 4c1045e..b5aeb40 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -251,8 +251,8 @@ QList<QByteArray> QFontEngineQPF::cleanUpAfterClientCrash(const QList<int> &cras
{
QList<QByteArray> removedFonts;
QDir dir(qws_fontCacheDir(), QLatin1String("*.qsf"));
- for (int i = 0; i < int(dir.count()); ++i) {
- const QByteArray fileName = QFile::encodeName(dir.absoluteFilePath(dir[i]));
+ foreach (const QFileInfo &fi, dir.entryInfoList()) {
+ const QByteArray fileName = QFile::encodeName(fi.absoluteFilePath());
int fd = QT_OPEN(fileName.constData(), O_RDONLY, 0);
if (fd >= 0) {