diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-09-08 09:01:43 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-09-08 09:14:39 +0200 |
commit | 6f59466721d1d11d11da2c46f9e4092f65b14acf (patch) | |
tree | d20e538340801d55dfd12afee2986aea616b827b /src/gui/text/qrawfont_win.cpp | |
parent | 82286c2b96d9408b825c9c1d94ad45af371f09ea (diff) |
Fix regression in tst_qrawfont
Change 4d8cd11179e6cca162efe650d308124dc7aefb14 broke QRawFont on
Windows by removing some code. After the font has been renamed, we need
to use the new font tables rather than the old ones for registering the
font in the system.
Reviewed-by: aavit
Diffstat (limited to 'src/gui/text/qrawfont_win.cpp')
-rw-r--r-- | src/gui/text/qrawfont_win.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qrawfont_win.cpp b/src/gui/text/qrawfont_win.cpp index ea1e75b9da..a729e310d5 100644 --- a/src/gui/text/qrawfont_win.cpp +++ b/src/gui/text/qrawfont_win.cpp @@ -578,7 +578,9 @@ void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, resolveGdi32(); if (ptrAddFontMemResourceEx && ptrRemoveFontMemResourceEx) { DWORD count = 0; - fontHandle = ptrAddFontMemResourceEx((void *)fontData.constData(), fontData.size(), 0, &count); + QByteArray newFontData = font.data(); + fontHandle = ptrAddFontMemResourceEx((void *)newFontData.constData(), newFontData.size(), + 0, &count); if (count == 0 && fontHandle != NULL) { ptrRemoveFontMemResourceEx(fontHandle); fontHandle = NULL; |