summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-05-07 13:07:34 +0200
committerLiang Qi <liang.qi@qt.io>2017-05-07 13:08:18 +0200
commitd1ea4813458b383e66ce4df69d1833b8b6a279c4 (patch)
tree3bdc16da993e5de56b669e6774fb0748075ddd90 /src/plugins/platforms/winrt/qwinrtscreen.cpp
parent1c87d4e1a1d0e1972f6dc85e55ea9be8a42797ba (diff)
parent0b1ec78c2d4871afcc89d5b046926b88f0819a7c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 7ac4bdac6c..c370c2ec50 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -100,27 +100,17 @@ QT_BEGIN_NAMESPACE
struct KeyInfo {
KeyInfo()
- : virtualKey(0)
- , isAutoRepeat(false)
- {
- }
-
- KeyInfo(const QString &text, quint32 virtualKey)
- : text(text)
- , virtualKey(virtualKey)
- , isAutoRepeat(false)
{
}
KeyInfo(quint32 virtualKey)
: virtualKey(virtualKey)
- , isAutoRepeat(false)
{
}
QString text;
- quint32 virtualKey;
- bool isAutoRepeat;
+ quint32 virtualKey{0};
+ bool isAutoRepeat{false};
};
static inline Qt::ScreenOrientations qtOrientationsFromNative(DisplayOrientations native)
@@ -991,9 +981,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind
virtualKey,
0,
QString(),
- d->activeKeys.value(key).isAutoRepeat,
- !status.RepeatCount ? 1 : status.RepeatCount,
- false);
+ d->activeKeys.value(key).isAutoRepeat);
} else {
d->activeKeys.insert(key, KeyInfo(virtualKey));
}
@@ -1021,9 +1009,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind
virtualKey,
0,
QString(),
- d->activeKeys.value(key).isAutoRepeat,
- !status.RepeatCount ? 1 : status.RepeatCount,
- false);
+ d->activeKeys.value(key).isAutoRepeat);
return S_OK;
}
@@ -1048,9 +1034,7 @@ HRESULT QWinRTScreen::onKeyUp(ABI::Windows::UI::Core::ICoreWindow *, ABI::Window
virtualKey,
0,
info.text,
- false, // The final key release does not have autoRepeat set on Windows
- !status.RepeatCount ? 1 : status.RepeatCount,
- false);
+ false); // The final key release does not have autoRepeat set on Windows
return S_OK;
}
@@ -1071,7 +1055,8 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent
const Qt::KeyboardModifiers modifiers = keyboardModifiers();
const Qt::Key key = qKeyFromCode(keyCode, modifiers);
const QString text = QChar(keyCode);
- const KeyInfo info = d->activeKeys.value(key);
+ KeyInfo &info = d->activeKeys[key];
+ info.text = text;
QWindowSystemInterface::handleExtendedKeyEvent(
topWindow(),
QEvent::KeyPress,
@@ -1081,9 +1066,7 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent
info.virtualKey,
0,
text,
- info.isAutoRepeat,
- !status.RepeatCount ? 1 : status.RepeatCount,
- false);
+ info.isAutoRepeat);
return S_OK;
}