summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:19:28 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:19:28 (GMT)
commit162892030766ffe8711888ea9e8d3a368c6a75b2 (patch)
treeddfda2e163fdce5d7ead7ac1fbd7aedb4bb06b79 /src/gui/text
parent0bc91ae61b07751f44210e1b772679c0a180c900 (diff)
parent26b8b6783afe2c1c9f27c935eb46c05229757af1 (diff)
downloadQt-162892030766ffe8711888ea9e8d3a368c6a75b2.zip
Qt-162892030766ffe8711888ea9e8d3a368c6a75b2.tar.gz
Qt-162892030766ffe8711888ea9e8d3a368c6a75b2.tar.bz2
Merge branch '4.6'
Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_qpf.cpp3
-rw-r--r--src/gui/text/qfontengine_win.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index e05a502..05dea6e 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -66,9 +66,10 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_QWS_QPF2
-QT_BEGIN_INCLUDE_NAMESPACE
#include "qpfutil.cpp"
+QT_BEGIN_INCLUDE_NAMESPACE
+
#if defined(Q_WS_QWS)
# include "private/qwscommand_qws_p.h"
# include "qwsdisplay_qws.h"
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 173b822..7a9d958 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -327,8 +327,10 @@ QFontEngineWin::QFontEngineWin(const QString &name, HFONT _hfont, bool stockFont
BOOL res = GetTextMetrics(hdc, &tm);
fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
- if (!res)
+ if (!res) {
qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
+ ZeroMemory(&tm, sizeof(TEXTMETRIC));
+ }
cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000;
getCMap();