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>bb10
parent
caa82c3518
commit
273ddd5b23
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue