summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_qpf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontengine_qpf.cpp')
-rw-r--r--src/gui/text/qfontengine_qpf.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index c7a3151..30a1623 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) {
@@ -306,6 +306,8 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
glyphMapEntries = 0;
glyphDataOffset = 0;
glyphDataSize = 0;
+ if (renderingFontEngine)
+ glyphFormat = renderingFontEngine->glyphFormat;
kerning_pairs_loaded = false;
readOnly = true;
@@ -340,14 +342,14 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
fd = QT_OPEN(encodedFileName, O_RDONLY);
if (fd == -1) {
#if defined(DEBUG_FONTENGINE)
- qErrnoWarning("QFontEngineQPF: unable to open %s", encodedName.constData());
+ qErrnoWarning("QFontEngineQPF: unable to open %s", encodedFileName.constData());
#endif
return;
}
}
if (fd == -1) {
#if defined(DEBUG_FONTENGINE)
- qWarning("QFontEngineQPF: insufficient access rights to %s", encodedName.constData());
+ qWarning("QFontEngineQPF: insufficient access rights to %s", encodedFileName.constData());
#endif
return;
}
@@ -359,7 +361,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
fd = QT_OPEN(encodedFileName, O_RDWR | O_EXCL | O_CREAT, 0644);
if (fd == -1) {
#if defined(DEBUG_FONTENGINE)
- qErrnoWarning(errno, "QFontEngineQPF: open() failed for %s", encodedName.constData());
+ qErrnoWarning(errno, "QFontEngineQPF: open() failed for %s", encodedFileName.constData());
#endif
return;
}
@@ -372,7 +374,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
const QByteArray &data = buffer.data();
if (QT_WRITE(fd, data.constData(), data.size()) == -1) {
#if defined(DEBUG_FONTENGINE)
- qErrnoWarning(errno, "QFontEngineQPF: write() failed for %s", encodedName.constData());
+ qErrnoWarning(errno, "QFontEngineQPF: write() failed for %s", encodedFileName.constData());
#endif
return;
}