path: root/src/plugins/platforms
diff options
authorFriedemann Kleint <>2017-06-09 15:44:00 +0200
committerOliver Wolff <>2017-06-14 05:17:00 +0000
commitac7e8cc7f74b511c2ce6577d7d2b6c648b78a87d (patch)
tree92f4e50c271cb774bf3bbd6c82e5ff8abb615807 /src/plugins/platforms
parent25d9bd4bf4f088441addb044a499179b6063494f (diff)
Direct2D: Fix build with MinGW 7.1
qwindowsdirect2ddevicecontext.cpp:92:105: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'HRESULT {aka long int}' [-Werror=format=] qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2); Change format to long and cast argument to long for extra safety (should some obscure MinGW header define another type). Change-Id: I7e6cb8ea1e5c27ef104b162ced9a696ab252fd8d Reviewed-by: Joerg Bornemann <>
Diffstat (limited to 'src/plugins/platforms')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
index 8a34f6974f..643ae877d0 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
@@ -89,7 +89,8 @@ public:
if (FAILED(hr)) {
success = false;
- qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2);
+ qWarning("%s: EndDraw failed: %#lx, tag1: %lld, tag2: %lld",
+ __FUNCTION__, long(hr), tag1, tag2);