diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/plugins/platforms/windows/qwindowscursor.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscursor.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscursor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp index 4f669a5509..00d011ccec 100644 --- a/src/plugins/platforms/windows/qwindowscursor.cpp +++ b/src/plugins/platforms/windows/qwindowscursor.cpp @@ -102,7 +102,7 @@ QWindowsPixmapCursorCacheKey::QWindowsPixmapCursorCacheKey(const QCursor &c) HCURSOR QWindowsCursor::createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot, qreal scaleFactor) { - HCURSOR cur = 0; + HCURSOR cur = nullptr; const qreal pixmapScaleFactor = scaleFactor / pixmap.devicePixelRatioF(); if (!qFuzzyCompare(pixmapScaleFactor, 1)) { pixmap = pixmap.scaled((pixmapScaleFactor * QSizeF(pixmap.size())).toSize(), @@ -161,7 +161,7 @@ static HCURSOR createBitmapCursor(const QImage &bbits, const QImage &mbits, ++x; } } - return CreateCursor(GetModuleHandle(0), hotSpot.x(), hotSpot.y(), width, height, + return CreateCursor(GetModuleHandle(nullptr), hotSpot.x(), hotSpot.y(), width, height, xBits.data(), xMask.data()); } @@ -456,7 +456,7 @@ QWindowsCursor::PixmapCursor QWindowsCursor::customCursor(Qt::CursorShape cursor const QSize cursorSize = systemCursorSize(screen); const QWindowsCustomPngCursor *sEnd = pngCursors + sizeof(pngCursors) / sizeof(pngCursors[0]); - const QWindowsCustomPngCursor *bestFit = 0; + const QWindowsCustomPngCursor *bestFit = nullptr; int sizeDelta = INT_MAX; for (const QWindowsCustomPngCursor *s = pngCursors; s < sEnd; ++s) { if (s->shape != cursorShape) @@ -532,7 +532,7 @@ HCURSOR QWindowsCursor::createCursorFromShape(Qt::CursorShape cursorShape, const } qWarning("%s: Invalid cursor shape %d", __FUNCTION__, cursorShape); - return 0; + return nullptr; } /*! @@ -741,10 +741,10 @@ QPixmap QWindowsCursor::dragDefaultCursor(Qt::DropAction action) const "...............XXXX....."}; if (m_ignoreDragCursor.isNull()) { - HCURSOR cursor = LoadCursor(NULL, IDC_NO); - ICONINFO iconInfo = {0, 0, 0, 0, 0}; + HCURSOR cursor = LoadCursor(nullptr, IDC_NO); + ICONINFO iconInfo = {0, 0, 0, nullptr, nullptr}; GetIconInfo(cursor, &iconInfo); - BITMAP bmColor = {0, 0, 0, 0, 0, 0, 0}; + BITMAP bmColor = {0, 0, 0, 0, 0, 0, nullptr}; if (iconInfo.hbmColor && GetObject(iconInfo.hbmColor, sizeof(BITMAP), &bmColor) @@ -780,7 +780,7 @@ HCURSOR QWindowsCursor::hCursor(const QCursor &c) const if (sit != m_standardCursorCache.constEnd()) return sit.value()->handle(); } - return HCURSOR(0); + return HCURSOR(nullptr); } /*! |