summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-03-03 15:26:59 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-03-04 16:01:29 +0000
commit273ddd5b234a5f89f65a41b926378f73701926b9 (patch)
treece96013e0295a0aac009f10f61ea703106e7c5b3 /src
parentcaa82c3518b4a5c09b1de990874190d5d765656f (diff)
DirectWrite: Output correct error code on failure
GetLastError() does not return the correct error code for the DirectWrite functions, they are returned by the function itself. Task-number: QTBUG-18711 Change-Id: I3931f58bb29a5f2dc4a5aa911ff16a873267d185 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 05e5af418a..40ea92155a 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1765,14 +1765,14 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request,
IDWriteFont *directWriteFont = 0;
HRESULT hr = data->directWriteGdiInterop->CreateFontFromLOGFONT(&lf, &directWriteFont);
if (FAILED(hr)) {
- const QString errorString = qt_error_string(int(GetLastError()));
+ const QString errorString = qt_error_string(int(hr));
qWarning().noquote().nospace() << "DirectWrite: CreateFontFromLOGFONT() failed ("
<< errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
} else {
IDWriteFontFace *directWriteFontFace = NULL;
hr = directWriteFont->CreateFontFace(&directWriteFontFace);
if (FAILED(hr)) {
- const QString errorString = qt_error_string(int(GetLastError()));
+ const QString errorString = qt_error_string(int(hr));
qWarning().noquote() << "DirectWrite: CreateFontFace() failed ("
<< errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
} else {