summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-01-28 13:52:29 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-10-27 06:18:52 +0000
commitd9beeb65f9b30e33cdb54eef355b851f11f13e90 (patch)
tree8e40f41b15ec425330d94f841955e34995210b69 /src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
parentef43195617de505d49137ebb46df2b2ddc7bc3d8 (diff)
Direct2d: Fix some CLANG warnings
Fix warnings about integer and double to float conversions, mostly. Change-Id: I7c0568051eabea9af9cbdaeb36da0b2affb174e1 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Diffstat (limited to 'src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp')
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
index c750b02078..9c325f6b86 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
@@ -100,12 +100,12 @@ void QWindowsDirect2DWindow::flush(QWindowsDirect2DBitmap *bitmap, const QRegion
HRESULT hr = m_swapChain->GetDesc1(&desc);
QRect geom = geometry();
- if ((FAILED(hr) || (desc.Width != geom.width()) || (desc.Height != geom.height()))) {
+ if (FAILED(hr) || (desc.Width != UINT(geom.width()) || (desc.Height != UINT(geom.height())))) {
resizeSwapChain(geom.size());
m_swapChain->GetDesc1(&desc);
}
- size.setWidth(desc.Width);
- size.setHeight(desc.Height);
+ size.setWidth(int(desc.Width));
+ size.setHeight(int(desc.Height));
} else {
size = geometry().size();
}
@@ -175,7 +175,7 @@ void QWindowsDirect2DWindow::present(const QRegion &region)
UPDATELAYEREDWINDOWINFO info = { sizeof(UPDATELAYEREDWINDOWINFO), NULL,
&ptDst, &size, hdc, &ptSrc, 0, &blend, ULW_ALPHA, &dirty };
if (!UpdateLayeredWindowIndirect(handle(), &info))
- qErrnoWarning(GetLastError(), "Failed to update the layered window");
+ qErrnoWarning(int(GetLastError()), "Failed to update the layered window");
hr = dxgiSurface->ReleaseDC(NULL);
if (FAILED(hr))
@@ -217,7 +217,7 @@ void QWindowsDirect2DWindow::resizeSwapChain(const QSize &size)
return;
HRESULT hr = m_swapChain->ResizeBuffers(0,
- size.width(), size.height(),
+ UINT(size.width()), UINT(size.height()),
DXGI_FORMAT_UNKNOWN,
0);
if (FAILED(hr))
@@ -282,7 +282,7 @@ void QWindowsDirect2DWindow::setupBitmap()
}
} else {
const QRect rect = geometry();
- CD3D11_TEXTURE2D_DESC backBufferDesc(DXGI_FORMAT_B8G8R8A8_UNORM, rect.width(), rect.height(), 1, 1);
+ CD3D11_TEXTURE2D_DESC backBufferDesc(DXGI_FORMAT_B8G8R8A8_UNORM, UINT(rect.width()), UINT(rect.height()), 1, 1);
backBufferDesc.BindFlags = D3D11_BIND_RENDER_TARGET;
backBufferDesc.MiscFlags = D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
ComPtr<ID3D11Texture2D> backBufferTexture;