QCocoaKeyMapper: do not sum integral+QFlags
It will become illegal; keep the semantics but force the right casts. Change-Id: I4002c5bca6eb90e798e35ca263e7bbb4ff5ad4b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f6802a5aac
commit
d5db4ab46d
@ -514,7 +514,7 @@ QList<int> QCocoaKeyMapper::possibleKeys(const QKeyEvent *event) const
|
||||
|
||||
// The base key, with the complete set of modifiers,
|
||||
// is always valid, and the first priority.
|
||||
ret << int(unmodifiedKey + eventModifiers);
|
||||
ret << int(unmodifiedKey) + int(eventModifiers);
|
||||
|
||||
// FIXME: We only compute the first 8 combinations. Why?
|
||||
for (int i = 1; i < 8; ++i) {
|
||||
@ -526,7 +526,7 @@ QList<int> QCocoaKeyMapper::possibleKeys(const QKeyEvent *event) const
|
||||
// perfectly, the current candidate modifiers.
|
||||
auto candidateModifiers = modifierCombinations[i];
|
||||
if ((eventModifiers & candidateModifiers) == candidateModifiers)
|
||||
ret << int(keyAfterApplyingModifiers + (eventModifiers & ~candidateModifiers));
|
||||
ret << int(keyAfterApplyingModifiers) + int(eventModifiers & ~candidateModifiers);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user