summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_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/qfontdatabase_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/qfontdatabase_qws.cpp')
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp
index 2c359ba..d348e1b 100644
--- a/src/gui/text/qfontdatabase_qws.cpp
+++ b/src/gui/text/qfontdatabase_qws.cpp
@@ -55,6 +55,7 @@
#endif
#include "qfontengine_qpf_p.h"
#include "private/qfactoryloader_p.h"
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
#include "qabstractfontengine_qws.h"
#include "qabstractfontengine_p.h"
#include <qdatetime.h>
@@ -128,7 +129,7 @@ void QFontDatabasePrivate::addQPF2File(const QByteArray &file)
struct stat st;
if (stat(file.constData(), &st))
return;
- int f = ::open(file, O_RDONLY, 0);
+ int f = QT_OPEN(file, O_RDONLY, 0);
if (f < 0)
return;
const uchar *data = (const uchar *)mmap(0, st.st_size, PROT_READ, MAP_SHARED, f, 0);
@@ -176,7 +177,7 @@ void QFontDatabasePrivate::addQPF2File(const QByteArray &file)
#endif
}
#ifndef QT_FONTS_ARE_RESOURCES
- ::close(f);
+ QT_CLOSE(f);
#endif
}
#endif