diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-04 11:27:55 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-05 12:41:39 +0000 |
commit | 2e48dbfa83689842c72dc57cea751bfec2881678 (patch) | |
tree | 2cd95bf6a9bdbad24afe15b54e86e05f87de5a43 /src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp | |
parent | e79ceb97340699ed806aa021e1bda4b63fa6f3fe (diff) |
Direct2D QPA: Fix g++ warnings
Fix warnings like:
qwindowsdirect2dpaintengine.cpp:722:107: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'HRESULT {aka long int}' [-Werror=format=]
qWarning("%s: Could not convert Direct2D linear gradient brush: %#x", __FUNCTION__, hr);
qwindowsdirect2dintegration.cpp:112:88: error: passing NULL to non-pointer argument 2 of 'WINBOOL GetFileVersionInfoW(LPCWSTR, DWORD, DWORD, LPVOID)' [-Werror=conversion-null]
if (GetFileVersionInfo(filename, NULL, versionInfoSize, info.data())) {
^
Change-Id: Ie03abdb5f4ba47b4803c283b9a4ec10181aae76e
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Diffstat (limited to 'src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp')
-rw-r--r-- | src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp index 57491cb5b0..38425f8fa1 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp @@ -90,7 +90,7 @@ public: if (SUCCEEDED(hr)) deviceContext->get()->SetTarget(bitmap.Get()); else - qWarning("%s: Could not create bitmap: %#x", __FUNCTION__, hr); + qWarning("%s: Could not create bitmap: %#lx", __FUNCTION__, hr); return SUCCEEDED(hr); } @@ -108,23 +108,23 @@ public: D2D1_BITMAP_PROPERTIES1 properties = bitmapProperties(); properties.bitmapOptions = D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_CPU_READ; - hr = deviceContext->get()->CreateBitmap(size, NULL, NULL, + hr = deviceContext->get()->CreateBitmap(size, NULL, 0, properties, &mappingCopy); if (FAILED(hr)) { - qWarning("%s: Could not create bitmap: %#x", __FUNCTION__, hr); + qWarning("%s: Could not create bitmap: %#lx", __FUNCTION__, hr); return QImage(); } hr = mappingCopy->CopyFromBitmap(NULL, bitmap.Get(), NULL); if (FAILED(hr)) { - qWarning("%s: Could not copy from bitmap: %#x", __FUNCTION__, hr); + qWarning("%s: Could not copy from bitmap: %#lx", __FUNCTION__, hr); return QImage(); } D2D1_MAPPED_RECT mappedRect; hr = mappingCopy->Map(D2D1_MAP_OPTIONS_READ, &mappedRect); if (FAILED(hr)) { - qWarning("%s: Could not map: %#x", __FUNCTION__, hr); + qWarning("%s: Could not map: %#lx", __FUNCTION__, hr); return QImage(); } |