Fix boolean logic issues in qcoreapplication_win
Task-number: QTBUG-20482 Change-Id: Iadbde59953a86d5f74d68c7cdc36b7706525612c Reviewed-on: http://codereview.qt-project.org/6046 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>bb10
parent
31b89a8b31
commit
0e339e2ef5
|
|
@ -867,9 +867,9 @@ QString decodeMSG(const MSG& msg)
|
|||
long lKeyData = (long)lParam;
|
||||
int repCount = (lKeyData & 0xffff); // Bit 0-15
|
||||
int scanCode = (lKeyData & 0xf0000) >> 16; // Bit 16-23
|
||||
bool contextCode = (lKeyData && 0x20000000); // Bit 29
|
||||
bool prevState = (lKeyData && 0x40000000); // Bit 30
|
||||
bool transState = (lKeyData && 0x80000000); // Bit 31
|
||||
bool contextCode = !!(lKeyData & 0x20000000); // Bit 29
|
||||
bool prevState = !!(lKeyData & 0x40000000); // Bit 30
|
||||
bool transState = !!(lKeyData & 0x80000000); // Bit 31
|
||||
parameters.sprintf("Virual-key(0x%x) Scancode(%d) Rep(%d) Contextcode(%d), Prev state(%d), Trans state(%d)",
|
||||
nVirtKey, scanCode, repCount, contextCode, prevState, transState);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue