summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-11 11:30:01 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-09-11 11:30:01 (GMT)
commit7dab66be83319cf7cd6cf48edc9ed19e154139bc (patch)
treeca6e83b6e85962947c9ea889c5159aff699767de /src/gui
parent7ea2c96fbd394fe930dc59b611b125ad269ec0ab (diff)
parent42beaa8e1e422a41efe1a398b55db044827f336c (diff)
downloadQt-7dab66be83319cf7cd6cf48edc9ed19e154139bc.zip
Qt-7dab66be83319cf7cd6cf48edc9ed19e154139bc.tar.gz
Qt-7dab66be83319cf7cd6cf48edc9ed19e154139bc.tar.bz2
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine_qws.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_qws.cpp b/src/gui/text/qfontengine_qws.cpp
index 62a674a..888e1be 100644
--- a/src/gui/text/qfontengine_qws.cpp
+++ b/src/gui/text/qfontengine_qws.cpp
@@ -381,6 +381,8 @@ class QFontEngineQPF1Data
public:
QPFFontMetrics fm;
QPFGlyphTree *tree;
+ void *mmapStart;
+ size_t mmapLength;
};
@@ -410,6 +412,8 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
QT_CLOSE(f);
d = new QFontEngineQPF1Data;
+ d->mmapStart = data;
+ d->mmapLength = st.st_size;
memcpy(reinterpret_cast<char*>(&d->fm),data,sizeof(d->fm));
data += sizeof(d->fm);
@@ -431,6 +435,8 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
QFontEngineQPF1::~QFontEngineQPF1()
{
+ if (d->mmapStart)
+ munmap(d->mmapStart, d->mmapLength);
delete d->tree;
delete d;
}