summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsmousehandler.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-02-08 09:28:00 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-08 12:31:02 +0100
commitfbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch)
tree92da72786b3740e37004623612c4fc1c9640d30f /src/plugins/platforms/windows/qwindowsmousehandler.cpp
parentc1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff)
parent74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index fcdd179a31..737fd1d2a9 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -75,11 +75,11 @@ static inline void compressMouseMove(MSG *msg)
// key release events (kls 2003-05-13):
MSG keyMsg;
bool done = false;
- while (PeekMessage(&keyMsg, 0, WM_KEYFIRST, WM_KEYLAST,
+ while (PeekMessage(&keyMsg, nullptr, WM_KEYFIRST, WM_KEYLAST,
PM_NOREMOVE)) {
if (keyMsg.time < mouseMsg.time) {
if ((keyMsg.lParam & 0xC0000000) == 0x40000000) {
- PeekMessage(&keyMsg, 0, keyMsg.message,
+ PeekMessage(&keyMsg, nullptr, keyMsg.message,
keyMsg.message, PM_REMOVE);
} else {
done = true;
@@ -121,7 +121,7 @@ static inline QTouchDevice *createTouchDevice()
{
const int digitizers = GetSystemMetrics(SM_DIGITIZER);
if (!(digitizers & (NID_INTEGRATED_TOUCH | NID_EXTERNAL_TOUCH)))
- return 0;
+ return nullptr;
const int tabletPc = GetSystemMetrics(SM_TABLETPC);
const int maxTouchPoints = GetSystemMetrics(SM_MAXIMUMTOUCHES);
qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~NID_READY)
@@ -159,7 +159,7 @@ QTouchDevice *QWindowsMouseHandler::ensureTouchDevice()
Qt::MouseButtons QWindowsMouseHandler::queryMouseButtons()
{
- Qt::MouseButtons result = 0;
+ Qt::MouseButtons result = nullptr;
const bool mouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON) < 0)
result |= mouseSwapped ? Qt::RightButton: Qt::LeftButton;
@@ -327,8 +327,8 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
QWindow *leaveTarget = m_windowUnderMouse ? m_windowUnderMouse : m_trackedWindow;
qCDebug(lcQpaEvents) << "Generating leave event for " << leaveTarget;
QWindowSystemInterface::handleLeaveEvent(leaveTarget);
- m_trackedWindow = 0;
- m_windowUnderMouse = 0;
+ m_trackedWindow = nullptr;
+ m_windowUnderMouse = nullptr;
}
return true;
}
@@ -430,7 +430,7 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
if (currentNotCapturing) {
// Clear tracking if capturing and current window is not the capturing window
// to avoid leave when mouse actually leaves the application.
- m_trackedWindow = 0;
+ m_trackedWindow = nullptr;
// We are not officially in any window, but we need to set some cursor to clear
// whatever cursor the left window had, so apply the cursor of the capture window.
platformWindow->applyCursor();
@@ -464,7 +464,7 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
QWindowsKeyMapper::queryKeyboardModifiers(),
source);
}
- m_previousCaptureWindow = hasCapture ? window : 0;
+ m_previousCaptureWindow = hasCapture ? window : nullptr;
// QTBUG-48117, force synchronous handling for the extra buttons so that WM_APPCOMMAND
// is sent for unhandled WM_XBUTTONDOWN.
return (msg.message != WM_XBUTTONUP && msg.message != WM_XBUTTONDOWN && msg.message != WM_XBUTTONDBLCLK)
@@ -595,7 +595,7 @@ bool QWindowsMouseHandler::translateTouchEvent(QWindow *window, HWND,
QTouchPointList touchPoints;
touchPoints.reserve(winTouchPointCount);
- Qt::TouchPointStates allStates = 0;
+ Qt::TouchPointStates allStates = nullptr;
GetTouchInputInfo(reinterpret_cast<HTOUCHINPUT>(msg.lParam),
UINT(msg.wParam), winTouchInputs.data(), sizeof(TOUCHINPUT));