summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_qws.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-04-23 09:55:02 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-02 11:29:36 (GMT)
commitcad1bf4c902899ec1a8277d46272afa23fc2b34b (patch)
treebc4c4f318893d2d8723b4898fc4edcf544eb4b83 /src/gui/text/qfontengine_qws.cpp
parent27fc6ef5dfb7d58af778de162298fdc4da34459f (diff)
downloadQt-cad1bf4c902899ec1a8277d46272afa23fc2b34b.zip
Qt-cad1bf4c902899ec1a8277d46272afa23fc2b34b.tar.gz
Qt-cad1bf4c902899ec1a8277d46272afa23fc2b34b.tar.bz2
Port gui/embedded to the EINTR-safe functions.
I think I found two file descriptor that aren't closed. One seems like a genuine leak, the other seems intentional. Reviewed-By: ossi
Diffstat (limited to 'src/gui/text/qfontengine_qws.cpp')
-rw-r--r--src/gui/text/qfontengine_qws.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_qws.cpp b/src/gui/text/qfontengine_qws.cpp
index 6fb4f15..70ce8f9 100644
--- a/src/gui/text/qfontengine_qws.cpp
+++ b/src/gui/text/qfontengine_qws.cpp
@@ -47,6 +47,7 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qpdf_p.h>
#include "qtextengine_p.h"
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
#include <qdebug.h>
@@ -387,7 +388,7 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
{
cache_cost = 1;
- int f = ::open( QFile::encodeName(fn), O_RDONLY, 0);
+ int f = QT_OPEN( QFile::encodeName(fn), O_RDONLY, 0);
Q_ASSERT(f>=0);
QT_STATBUF st;
if ( QT_FSTAT( f, &st ) )
@@ -406,7 +407,7 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
#endif
if ( !data || data == (uchar*)MAP_FAILED )
qFatal("Failed to mmap %s",QFile::encodeName(fn).data());
- ::close(f);
+ QT_CLOSE(f);
d = new QFontEngineQPF1Data;
memcpy(reinterpret_cast<char*>(&d->fm),data,sizeof(d->fm));