| ... | ... | index 910ea7b414f32bfbd41e6d63e6f5f4159e0aa9ee..656099752fad8bcce373f45e8855a0e5564dba10 100644 |
| ... | ... | --- a/0004-Avoid-reparenting-of-InputPanel-when-the-window-is-b.patch |
| ... | ... | +++ b/0001-Avoid-reparenting-of-InputPanel-when-the-window-is-b.patch |
| ... | ... | @@ -1,7 +1,7 @@ |
| 1 |
From 353b75b2e34bdae901625bbddf5c5e3f3e6c0de5 Mon Sep 17 00:00:00 2001
|
|
| 1 |
From f58e05d07cb897bf71d4d621f98ea9d86798b7a2 Mon Sep 17 00:00:00 2001
|
|
| 2 | 2 |
From: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
| 3 | 3 |
Date: Wed, 25 Aug 2021 16:42:32 +0300
|
| 4 |
Subject: [PATCH] Avoid reparenting of InputPanel when the window is being
|
|
| 4 |
Subject: [PATCH 1/3] Avoid reparenting of InputPanel when the window is being
|
|
| 5 | 5 |
destroyed
|
| 6 | 6 |
|
| 7 | 7 |
Fixes: QTBUG-95996
|
| ... | ... | @@ -32,5 +32,5 @@ index a7c0aad9..e04c828d 100644 |
| … | … | |
| 32 | 32 |
}
|
| 33 | 33 |
} else {
|
| 34 | 34 |
--
|
| 35 |
2.33.1
|
|
| 35 |
2.37.0
|
|
| 36 | 36 |
|
| ... | ... | --- /dev/null |
| ... | ... | +++ b/0002-Fix-high-CPU-utilization-caused-by-key-repeat-timer.patch |
| ... | ... | @@ -0,0 +1,46 @@ |
| 1 |
From c4019d18d2c1cc9b9f05df7542a20a7eaa101cc1 Mon Sep 17 00:00:00 2001
|
|
| 2 |
From: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
|
| 3 |
Date: Mon, 7 Jun 2021 14:04:27 +0300
|
|
| 4 |
Subject: [PATCH 2/3] Fix high CPU utilization caused by key repeat timer
|
|
| 5 |
|
|
| 6 |
Key repeat timer has been broken since the beginning.
|
|
| 7 |
|
|
| 8 |
The key repeat timer leaked timer instances while processing the event,
|
|
| 9 |
causing the accumulation of unprocessed timer events and high CPU
|
|
| 10 |
utilization.
|
|
| 11 |
|
|
| 12 |
Fix the issue by killing the original timer (long press delay 600 ms)
|
|
| 13 |
and starting the key repeat timer (repeat delay 50 ms) once.
|
|
| 14 |
|
|
| 15 |
[ChangeLog] Fixed high CPU utilization caused by key repeat timer.
|
|
| 16 |
|
|
| 17 |
Pick-to: 5.12 5.15 6.1 6.2
|
|
| 18 |
Fixes: QTBUG-94259
|
|
| 19 |
Change-Id: Iff47249db27cda3750f497cb02c1cb642261e032
|
|
| 20 |
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
|
| 21 |
(cherry picked from commit 63a944ff12580f2c333a162ecaecd12419a39c10)
|
|
| 22 |
---
|
|
| 23 |
src/virtualkeyboard/qvirtualkeyboardinputengine.cpp | 6 ++++--
|
|
| 24 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
| 25 |
|
|
| 26 |
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp b/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp
|
|
| 27 |
index e64ea4eb..5f74c2a7 100644
|
|
| 28 |
--- a/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp
|
|
| 29 |
+++ b/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp
|
|
| 30 |
@@ -716,9 +716,11 @@ void QVirtualKeyboardInputEngine::timerEvent(QTimerEvent *timerEvent)
|
|
| 31 |
{
|
|
| 32 |
Q_D(QVirtualKeyboardInputEngine);
|
|
| 33 |
if (timerEvent->timerId() == d->repeatTimer) {
|
|
| 34 |
- d->repeatTimer = 0;
|
|
| 35 |
d->virtualKeyClick(d->activeKey, d->activeKeyText, d->activeKeyModifiers, true);
|
|
| 36 |
- d->repeatTimer = startTimer(50);
|
|
| 37 |
+ if (!d->repeatCount) {
|
|
| 38 |
+ killTimer(d->repeatTimer);
|
|
| 39 |
+ d->repeatTimer = startTimer(50);
|
|
| 40 |
+ }
|
|
| 41 |
d->repeatCount++;
|
|
| 42 |
}
|
|
| 43 |
}
|
|
| 44 |
--
|
|
| 45 |
2.37.0
|
|
| 46 |
|
| ... | ... | --- /dev/null |
| ... | ... | +++ b/0003-Fix-processing-of-hard-Qt-Key_Backspace-and-Qt-Key_D.patch |
| ... | ... | @@ -0,0 +1,106 @@ |
| 1 |
From 766c1b7acbdc9ff4e35f6eb341fd446b1c20b811 Mon Sep 17 00:00:00 2001
|
|
| 2 |
From: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
|
| 3 |
Date: Tue, 8 Jun 2021 15:25:09 +0300
|
|
| 4 |
Subject: [PATCH 3/3] Fix processing of hard Qt::Key_Backspace and
|
|
| 5 |
Qt::Key_Delete
|
|
| 6 |
|
|
| 7 |
Even though the virtual keyboard does not support hard keys at the
|
|
| 8 |
moment, this kind of processing could be possible in the future.
|
|
| 9 |
|
|
| 10 |
In the mean time, fix processing of backspace and delete keys.
|
|
| 11 |
|
|
| 12 |
In particular, if such key is pressed the pre-edit text is not empty:
|
|
| 13 |
|
|
| 14 |
- Reset input method state (should not modify pre-edit)
|
|
| 15 |
- Clear pre-edit
|
|
| 16 |
- Return true (to indicate no further processing is required)
|
|
| 17 |
|
|
| 18 |
[ChangeLog] Fix processing of hard backspace and delete keys.
|
|
| 19 |
|
|
| 20 |
Fixes: QTBUG-94017
|
|
| 21 |
Pick-to: 5.15 6.1 6.2
|
|
| 22 |
Change-Id: I7035f7612e966de6d17d92e754ecd7bdb3a6e530
|
|
| 23 |
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
|
| 24 |
(cherry picked from commit ca5b712dfc8e67aece0eb7374ffe5921e2aa45e8)
|
|
| 25 |
---
|
|
| 26 |
.../qvirtualkeyboardinputcontext_p.cpp | 14 ++++++++---
|
|
| 27 |
tests/auto/inputpanel/data/tst_inputpanel.qml | 24 +++++++++++++++++++
|
|
| 28 |
2 files changed, 35 insertions(+), 3 deletions(-)
|
|
| 29 |
|
|
| 30 |
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
|
|
| 31 |
index e04c828d..cacf33f0 100644
|
|
| 32 |
--- a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
|
|
| 33 |
+++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
|
|
| 34 |
@@ -507,6 +507,7 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event)
|
|
| 35 |
QEvent::Type type = event->type();
|
|
| 36 |
if (type == QEvent::KeyPress || type == QEvent::KeyRelease) {
|
|
| 37 |
const QKeyEvent *keyEvent = static_cast<const QKeyEvent *>(event);
|
|
| 38 |
+ const int key = keyEvent->key();
|
|
| 39 |
|
|
| 40 |
// Keep track of pressed keys update key event state
|
|
| 41 |
if (type == QEvent::KeyPress)
|
|
| 42 |
@@ -520,7 +521,6 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event)
|
|
| 43 |
setState(State::KeyEvent);
|
|
| 44 |
|
|
| 45 |
#ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
|
|
| 46 |
- int key = keyEvent->key();
|
|
| 47 |
if ((key >= Qt::Key_Left && key <= Qt::Key_Down) || key == Qt::Key_Return) {
|
|
| 48 |
if (type == QEvent::KeyPress && platformInputContext->isInputPanelVisible()) {
|
|
| 49 |
activeNavigationKeys += key;
|
|
| 50 |
@@ -535,8 +535,16 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event)
|
|
| 51 |
#endif
|
|
| 52 |
|
|
| 53 |
// Break composing text since the virtual keyboard does not support hard keyboard events
|
|
| 54 |
- if (!preeditText.isEmpty())
|
|
| 55 |
- commit();
|
|
| 56 |
+ if (!preeditText.isEmpty()) {
|
|
| 57 |
+ if (type == QEvent::KeyPress && (key == Qt::Key_Delete || key == Qt::Key_Backspace)) {
|
|
| 58 |
+ reset();
|
|
| 59 |
+ Q_Q(QVirtualKeyboardInputContext);
|
|
| 60 |
+ q->clear();
|
|
| 61 |
+ return true;
|
|
| 62 |
+ } else {
|
|
| 63 |
+ commit();
|
|
| 64 |
+ }
|
|
| 65 |
+ }
|
|
| 66 |
}
|
|
| 67 |
#ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
|
|
| 68 |
else if (type == QEvent::ShortcutOverride) {
|
|
| 69 |
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 70 |
index d814f282..f60acc64 100644
|
|
| 71 |
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 72 |
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 73 |
@@ -321,6 +321,30 @@ Rectangle {
|
|
| 74 |
compare(textInput.text, "A")
|
|
| 75 |
}
|
|
| 76 |
|
|
| 77 |
+ function test_hardKeyBackspaceClearsInput_data() {
|
|
| 78 |
+ return [
|
|
| 79 |
+ { initLocale: "en_GB", initText: "12345", initCursorPosition: 1, inputSequence: "hello", outputText: "12345", expectedCursorPosition: 1 },
|
|
| 80 |
+ ]
|
|
| 81 |
+ }
|
|
| 82 |
+
|
|
| 83 |
+ function test_hardKeyBackspaceClearsInput(data) {
|
|
| 84 |
+ prepareTest(data)
|
|
| 85 |
+
|
|
| 86 |
+ if (!inputPanel.wordCandidateListVisibleHint)
|
|
| 87 |
+ skip("Prediction/spell correction not enabled")
|
|
| 88 |
+
|
|
| 89 |
+ compare(Qt.inputMethod.locale.name, Qt.locale(data.initLocale).name)
|
|
| 90 |
+ for (var inputIndex in data.inputSequence) {
|
|
| 91 |
+ verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex]))
|
|
| 92 |
+ }
|
|
| 93 |
+
|
|
| 94 |
+ keyClick(Qt.Key_Backspace)
|
|
| 95 |
+ waitForRendering(textInput)
|
|
| 96 |
+
|
|
| 97 |
+ compare(textInput.text, data.outputText)
|
|
| 98 |
+ compare(textInput.cursorPosition, data.expectedCursorPosition)
|
|
| 99 |
+ }
|
|
| 100 |
+
|
|
| 101 |
function test_hardKeyInput() {
|
|
| 102 |
prepareTest()
|
|
| 103 |
|
|
| 104 |
--
|
|
| 105 |
2.37.0
|
|
| 106 |
|
| ... | ... | --- a/0003-Suggest-phrases-based-on-the-last-selected-word-of-p.patch |
| ... | ... | +++ /dev/null |
| ... | ... | @@ -1,48 +0,0 @@ |
| 0 |
From 2f0e9f98c6c6fdac09f762d41fddcc114f64b28a Mon Sep 17 00:00:00 2001
|
|
| 1 |
From: Niu Shouwei <niushouwei@126.com>
|
|
| 2 |
Date: Sat, 5 Dec 2020 10:22:20 +0800
|
|
| 3 |
Subject: [PATCH 3/3] Suggest phrases based on the last selected word of pinyin
|
|
| 4 |
|
|
| 5 |
The prediction was based on the previous character instead of
|
|
| 6 |
the last one.
|
|
| 7 |
|
|
| 8 |
Fixes: QTBUG-89018
|
|
| 9 |
Change-Id: Ib48040fc922bf0e3e02a7912be2b0d8919a81658
|
|
| 10 |
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
|
|
| 11 |
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
| 12 |
(cherry picked from commit bcd9320cc2c231bca7c671927f473ce82e6d071b)
|
|
| 13 |
---
|
|
| 14 |
src/plugins/pinyin/plugin/pinyininputmethod.cpp | 2 +-
|
|
| 15 |
tests/auto/inputpanel/data/tst_inputpanel.qml | 2 ++
|
|
| 16 |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
| 17 |
|
|
| 18 |
diff --git a/src/plugins/pinyin/plugin/pinyininputmethod.cpp b/src/plugins/pinyin/plugin/pinyininputmethod.cpp
|
|
| 19 |
index cdd7d21..f28f5fa 100644
|
|
| 20 |
--- a/src/plugins/pinyin/plugin/pinyininputmethod.cpp
|
|
| 21 |
+++ b/src/plugins/pinyin/plugin/pinyininputmethod.cpp
|
|
| 22 |
@@ -134,8 +134,8 @@ public:
|
|
| 23 |
if (composingStr.length() > 0) {
|
|
| 24 |
if ((candId >= 0 || finishSelection) && composingStr.length() == fixedLen) {
|
|
| 25 |
QString resultStr = getComposingStrActivePart();
|
|
| 26 |
- tryPredict();
|
|
| 27 |
q->inputContext()->commit(resultStr);
|
|
| 28 |
+ tryPredict();
|
|
| 29 |
} else if (state == Idle) {
|
|
| 30 |
state = Input;
|
|
| 31 |
}
|
|
| 32 |
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 33 |
index ec1dbd9..d814f28 100644
|
|
| 34 |
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 35 |
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
|
|
| 36 |
@@ -915,6 +915,8 @@ Rectangle {
|
|
| 37 |
{ initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "bailou", expectedCandidates: [ "\u5457", "\u5A04" ], outputText: "\u5457\u5A04" },
|
|
| 38 |
// Select phrase from the user dictinary
|
|
| 39 |
{ initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "bailou", expectedCandidates: [ "\u5457\u5A04" ], outputText: "\u5457\u5A04" },
|
|
| 40 |
+ // Suggest phrases according to the last selected word
|
|
| 41 |
+ { initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "da", expectedCandidates: [ "\u5927", "\u5bb6", "\u5ead" ], outputText: "\u5927\u5bb6\u5ead" },
|
|
| 42 |
// Add an apostrophe before joined syllables in cases of ambiguity, disable the user dictionary (Qt.ImhSensitiveData) so it does not affect to the results
|
|
| 43 |
{ initInputMethodHints: Qt.ImhNone | Qt.ImhSensitiveData, initLocale: "zh_CN", inputSequence: "zhangang", expectedCandidates: [ "\u5360", "\u94A2" ], outputText: "\u5360\u94A2" },
|
|
| 44 |
{ initInputMethodHints: Qt.ImhNone | Qt.ImhSensitiveData, initLocale: "zh_CN", inputSequence: "zhang'ang", expectedCandidates: [ "\u7AE0", "\u6602" ], outputText: "\u7AE0\u6602" },
|
|
| ... | ... | --- |
| 45 |
2.31.1
|
|
| 46 |
|
| ... | ... | --- a/hunspelldictdir.patch |
| ... | ... | +++ /dev/null |
| ... | ... | @@ -1,11 +0,0 @@ |
| 0 |
diff -urN qtvirtualkeyboard-everywhere-src-5.15.2/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp qtvirtualkeyboard-everywhere-src-5.15.2-patched/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp
|
|
| 1 |
--- qtvirtualkeyboard-everywhere-src-5.15.2/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp 2020-10-27 11:02:10.000000000 +0300
|
|
| 2 |
+++ qtvirtualkeyboard-everywhere-src-5.15.2-patched/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp 2021-12-07 10:29:53.689201330 +0300
|
|
| 3 |
@@ -87,6 +87,7 @@
|
|
| 4 |
<< QDir(QLibraryInfo::location(QLibraryInfo::DataPath) + QStringLiteral("/qtvirtualkeyboard/hunspell")).absolutePath()
|
|
| 5 |
#if !defined(Q_OS_WIN32)
|
|
| 6 |
<< QStringLiteral("/usr/share/hunspell")
|
|
| 7 |
+ << QStringLiteral("/usr/share/dict/ooo")
|
|
| 8 |
<< QStringLiteral("/usr/share/myspell/dicts")
|
|
| 9 |
#endif
|
|
| 10 |
;
|
| ... | ... | --- a/qt5-qtvirtualkeyboard.spec |
| ... | ... | +++ b/qt5-qtvirtualkeyboard.spec |
| ... | ... | @@ -14,17 +14,18 @@ |
| 14 | 14 |
|
| 15 | 15 |
Summary: Version 5 of the Qt toolkit (%{module} packages)
|
| 16 | 16 |
Name: qt5-%{module}
|
| 17 |
Version: 5.15.2
|
|
| 18 |
Release: 4
|
|
| 17 |
Version: 5.15.5
|
|
| 18 |
Release: 1
|
|
| 19 | 19 |
License: LGPLv3+
|
| 20 | 20 |
Group: Development/KDE and Qt
|
| 21 | 21 |
Url: http://qt-project.org/
|
| 22 |
Source0: https://download.qt.io/official_releases/qt/%(echo %{version}|cut -d. -f1-2)/%{version}/submodules/%{module}-everywhere-src-%{version}.tar.xz
|
|
| 23 |
Patch0: hunspelldictdir.patch
|
|
| 24 |
Patch1: qtvirtualkeyboard-5.15.0-hapticfeedback.patch
|
|
| 25 |
# From KDE
|
|
| 26 |
Patch1002: 0003-Suggest-phrases-based-on-the-last-selected-word-of-p.patch
|
|
| 27 |
Patch1003: 0004-Avoid-reparenting-of-InputPanel-when-the-window-is-b.patch
|
|
| 22 |
Source0: https://download.qt.io/official_releases/qt/%(echo %{version}|cut -d. -f1-2)/%{version}/submodules/%{module}-everywhere-opensource-src-%{version}.tar.xz
|
|
| 23 |
# From KDE https://invent.kde.org/qt/qt/qtvirtualkeyboard -b kde/5.15
|
|
| 24 |
Patch1000: 0001-Avoid-reparenting-of-InputPanel-when-the-window-is-b.patch
|
|
| 25 |
Patch1001: 0002-Fix-high-CPU-utilization-caused-by-key-repeat-timer.patch
|
|
| 26 |
Patch1002: 0003-Fix-processing-of-hard-Qt-Key_Backspace-and-Qt-Key_D.patch
|
|
| 27 |
# ROSA specific
|
|
| 28 |
Patch2000: qtvirtualkeyboard-5.15.0-hapticfeedback.patch
|
|
| 28 | 29 |
BuildRequires: pkgconfig(hunspell)
|
| 29 | 30 |
BuildRequires: pkgconfig(Qt5Core) >= %{version}
|
| 30 | 31 |
BuildRequires: pkgconfig(Qt5Gui) >= %{version}
|
| ... | ... | --- a/qtvirtualkeyboard-5.15.0-hapticfeedback.patch |
| ... | ... | +++ b/qtvirtualkeyboard-5.15.0-hapticfeedback.patch |
| ... | ... | @@ -1,6 +1,6 @@ |
| 1 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/bitfield.h.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/bitfield.h
|
|
| 2 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/bitfield.h.1~ 2020-09-10 01:29:56.499059017 +0200
|
|
| 3 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/bitfield.h 2020-09-10 01:29:56.499059017 +0200
|
|
| 1 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/bitfield.h.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/bitfield.h
|
|
| 2 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/bitfield.h.4~ 2022-03-09 00:39:31.777924104 +0100
|
|
| 3 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/bitfield.h 2022-03-09 00:39:31.777924104 +0100
|
|
| 4 | 4 |
@@ -0,0 +1,33 @@
|
| 5 | 5 |
+/* BitField class that, unlike std::bitset, works with
|
| 6 | 6 |
+ * C style input (memset/memcpy/...), and therefore with
|
| ... | ... | @@ -35,9 +35,9 @@ diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/bitfield.h. |
| … | … | |
| 35 | 35 |
+private:
|
| 36 | 36 |
+ uint8_t data[1+s/8];
|
| 37 | 37 |
+};
|
| 38 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.cpp.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.cpp
|
|
| 39 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.cpp.1~ 2020-09-10 01:29:56.500059031 +0200
|
|
| 40 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.cpp 2020-09-10 01:29:56.500059031 +0200
|
|
| 38 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.cpp.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.cpp
|
|
| 39 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.cpp.4~ 2022-03-09 00:39:31.777924104 +0100
|
|
| 40 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.cpp 2022-03-09 00:39:31.777924104 +0100
|
|
| 41 | 41 |
@@ -0,0 +1,126 @@
|
| 42 | 42 |
+/* Class to drive the PinePhone (and similar) vibrator
|
| 43 | 43 |
+ *
|
| ... | ... | @@ -165,9 +165,9 @@ diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedb |
| … | … | |
| 165 | 165 |
+void HapticFeedback::stop() {
|
| 166 | 166 |
+ sendCmd(false);
|
| 167 | 167 |
+}
|
| 168 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.h.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.h
|
|
| 169 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.h.1~ 2020-09-10 01:29:56.500059031 +0200
|
|
| 170 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedback.h 2020-09-10 01:29:56.500059031 +0200
|
|
| 168 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.h.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.h
|
|
| 169 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.h.4~ 2022-03-09 00:39:31.777924104 +0100
|
|
| 170 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/hapticfeedback.h 2022-03-09 00:39:31.777924104 +0100
|
|
| 171 | 171 |
@@ -0,0 +1,30 @@
|
| 172 | 172 |
+/**
|
| 173 | 173 |
+ * Haptic feedback for devices supporting the
|
| ... | ... | @@ -199,9 +199,9 @@ diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/hapticfeedb |
| … | … | |
| 199 | 199 |
+ ff_effect _effect[1];
|
| 200 | 200 |
+ FILE *_dbg;
|
| 201 | 201 |
+};
|
| 202 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp
|
|
| 203 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp.1~ 2020-08-24 11:20:53.000000000 +0200
|
|
| 204 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp 2020-09-10 01:29:56.500059031 +0200
|
|
| 202 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp
|
|
| 203 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp.4~ 2022-03-09 00:39:31.767924374 +0100
|
|
| 204 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp 2022-03-09 00:40:27.083433659 +0100
|
|
| 205 | 205 |
@@ -38,6 +38,8 @@
|
| 206 | 206 |
#include <QTimerEvent>
|
| 207 | 207 |
#include <QtCore/private/qobject_p.h>
|
| ... | ... | @@ -219,17 +219,17 @@ diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkey |
| … | … | |
| 219 | 219 |
d->activeKey = key;
|
| 220 | 220 |
d->activeKeyText = text;
|
| 221 | 221 |
d->activeKeyModifiers = modifiers;
|
| 222 |
@@ -717,6 +720,7 @@ void QVirtualKeyboardInputEngine::timerE
|
|
| 223 |
Q_D(QVirtualKeyboardInputEngine);
|
|
| 222 |
@@ -718,6 +721,7 @@ void QVirtualKeyboardInputEngine::timerE
|
|
| 224 | 223 |
if (timerEvent->timerId() == d->repeatTimer) {
|
| 225 |
d->repeatTimer = 0;
|
|
| 226 |
+ if(hf.isOk()) hf.start();
|
|
| 227 | 224 |
d->virtualKeyClick(d->activeKey, d->activeKeyText, d->activeKeyModifiers, true);
|
| 228 |
d->repeatTimer = startTimer(50);
|
|
| 229 |
d->repeatCount++;
|
|
| 230 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.h.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.h
|
|
| 231 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.h.1~ 2020-08-24 11:20:53.000000000 +0200
|
|
| 232 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkeyboardinputengine.h 2020-09-10 01:31:19.092189040 +0200
|
|
| 225 |
if (!d->repeatCount) {
|
|
| 226 |
+ if(hf.isOk()) hf.start();
|
|
| 227 |
killTimer(d->repeatTimer);
|
|
| 228 |
d->repeatTimer = startTimer(50);
|
|
| 229 |
}
|
|
| 230 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.h.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.h
|
|
| 231 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.h.4~ 2021-03-18 11:22:28.000000000 +0100
|
|
| 232 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/qvirtualkeyboardinputengine.h 2022-03-09 00:39:31.778924077 +0100
|
|
| 233 | 233 |
@@ -33,6 +33,7 @@
|
| 234 | 234 |
#include <QObject>
|
| 235 | 235 |
#include <QPointer>
|
| ... | ... | @@ -246,9 +246,9 @@ diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/qvirtualkey |
| … | … | |
| 246 | 246 |
friend class QVirtualKeyboardInputContext;
|
| 247 | 247 |
friend class QVirtualKeyboardInputContextPrivate;
|
| 248 | 248 |
};
|
| 249 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/virtualkeyboard.pro.1~ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/virtualkeyboard.pro
|
|
| 250 |
--- qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/virtualkeyboard.pro.1~ 2020-08-24 11:20:53.000000000 +0200
|
|
| 251 |
+++ qtvirtualkeyboard-everywhere-src-5.15.1/src/virtualkeyboard/virtualkeyboard.pro 2020-09-10 01:29:56.500059031 +0200
|
|
| 249 |
diff -up qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/virtualkeyboard.pro.4~ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/virtualkeyboard.pro
|
|
| 250 |
--- qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/virtualkeyboard.pro.4~ 2021-03-18 11:22:28.000000000 +0100
|
|
| 251 |
+++ qtvirtualkeyboard-everywhere-src-5.15.3/src/virtualkeyboard/virtualkeyboard.pro 2022-03-09 00:39:31.778924077 +0100
|
|
| 252 | 252 |
@@ -13,6 +13,7 @@ DEFINES += QVIRTUALKEYBOARD_LIBRARY
|
| 253 | 253 |
include(../config.pri)
|
| 254 | 254 |
|
New comment