summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowskeymapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowskeymapper.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 96abfdb9d7..c050369801 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE
static void clearKeyRecorderOnApplicationInActive(Qt::ApplicationState state);
QWindowsKeyMapper::QWindowsKeyMapper()
- : m_useRTLExtensions(false), m_keyGrabber(0)
+ : m_useRTLExtensions(false), m_keyGrabber(nullptr)
{
memset(keyLayout, 0, sizeof(keyLayout));
QGuiApplication *app = static_cast<QGuiApplication *>(QGuiApplication::instance());
@@ -162,7 +162,7 @@ static void clearKeyRecorderOnApplicationInActive(Qt::ApplicationState state)
KeyRecord *KeyRecorder::findKey(int code, bool remove)
{
- KeyRecord *result = 0;
+ KeyRecord *result = nullptr;
for (int i = 0; i < nrecs; ++i) {
if (records[i].code == code) {
if (remove) {
@@ -605,7 +605,7 @@ inline quint32 winceKeyBend(quint32 keyCode)
}
// Translate a VK into a Qt key code, or unicode character
-static inline quint32 toKeyOrUnicode(quint32 vk, quint32 scancode, unsigned char *kbdBuffer, bool *isDeadkey = 0)
+static inline quint32 toKeyOrUnicode(quint32 vk, quint32 scancode, unsigned char *kbdBuffer, bool *isDeadkey = nullptr)
{
Q_ASSERT(vk > 0 && vk < 256);
quint32 code = 0;
@@ -822,7 +822,7 @@ static void showSystemMenu(QWindow* w)
TPM_LEFTALIGN | TPM_TOPALIGN | TPM_NONOTIFY | TPM_RETURNCMD,
pos.x(), pos.y(),
topLevelHwnd,
- 0);
+ nullptr);
if (ret)
qWindowsWndProc(topLevelHwnd, WM_SYSCOMMAND, WPARAM(ret), 0);
}
@@ -1023,13 +1023,15 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, MSG msg,
if (dirStatus == VK_LSHIFT
&& ((msg.wParam == VK_SHIFT && GetKeyState(VK_LCONTROL))
|| (msg.wParam == VK_CONTROL && GetKeyState(VK_LSHIFT)))) {
- sendExtendedPressRelease(receiver, Qt::Key_Direction_L, 0, scancode, vk_key, nModifiers, QString(), false);
+ sendExtendedPressRelease(receiver, Qt::Key_Direction_L, nullptr,
+ scancode, vk_key, nModifiers, QString(), false);
result = true;
dirStatus = 0;
} else if (dirStatus == VK_RSHIFT
&& ( (msg.wParam == VK_SHIFT && GetKeyState(VK_RCONTROL))
|| (msg.wParam == VK_CONTROL && GetKeyState(VK_RSHIFT)))) {
- sendExtendedPressRelease(receiver, Qt::Key_Direction_R, 0, scancode, vk_key, nModifiers, QString(), false);
+ sendExtendedPressRelease(receiver, Qt::Key_Direction_R, nullptr,
+ scancode, vk_key, nModifiers, QString(), false);
result = true;
dirStatus = 0;
} else {
@@ -1140,7 +1142,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, MSG msg,
// This will stop the auto-repeat of the key, should a modifier change, for example
if (rec && rec->state != state) {
key_recorder.findKey(int(msg.wParam), true);
- rec = 0;
+ rec = nullptr;
}
// Find unicode character from Windows Message Queue
@@ -1150,7 +1152,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, MSG msg,
: msgType == WM_IME_KEYDOWN ? WM_IME_CHAR : WM_SYSCHAR);
QChar uch;
- if (PeekMessage(&wm_char, 0, charType, charType, PM_REMOVE)) {
+ if (PeekMessage(&wm_char, nullptr, charType, charType, PM_REMOVE)) {
if (QWindowsContext::filterNativeEvent(&wm_char, lResult))
return true;
if (receiver && QWindowsContext::filterNativeEvent(receiver, &wm_char, lResult))