winrt: Fix QKeyEvent::isAutoRepeat

When keeping a key pressed CorePhysicalKeyStatus'
RepeatCount stays 1 while WasKeyDown changes from
false to true. Thus WasKeyDown should be used to
determine the auto repeat status of the key event.

Task-number: QTBUG-52055
Change-Id: I7cde6b92473bd5335e85418c2b92cfe8f338975c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This commit is contained in:
Oliver Wolff 2016-03-22 15:50:44 +01:00
parent 34e0e908c8
commit fe4fad790e
1 changed files with 3 additions and 3 deletions

View File

@ -885,7 +885,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind
virtualKey,
0,
QString(),
status.RepeatCount > 1,
status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
return S_OK;
@ -912,7 +912,7 @@ HRESULT QWinRTScreen::onKeyUp(ABI::Windows::UI::Core::ICoreWindow *, ABI::Window
virtualKey,
0,
info.text,
status.RepeatCount > 1,
status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
return S_OK;
@ -945,7 +945,7 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent
virtualKey,
0,
text,
status.RepeatCount > 1,
status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
d->activeKeys.insert(key, KeyInfo(text, virtualKey));