diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-05-30 18:59:19 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-10-21 18:34:01 -0500 |
commit | ac0bbbdc782c5301108050f489f4d1b068ef787c (patch) | |
tree | c2a671533392229a9f1521931eda50647b812280 /user/qt5-qtvirtualkeyboard | |
parent | 94f6954312ebd9c27ba0918a8ec30fabd80f5d66 (diff) | |
download | packages-ac0bbbdc782c5301108050f489f4d1b068ef787c.tar.gz packages-ac0bbbdc782c5301108050f489f4d1b068ef787c.tar.bz2 packages-ac0bbbdc782c5301108050f489f4d1b068ef787c.tar.xz packages-ac0bbbdc782c5301108050f489f4d1b068ef787c.zip |
user/qt5: Update to 5.15.4
This includes KDE LTS patches when available.
Diffstat (limited to 'user/qt5-qtvirtualkeyboard')
-rw-r--r-- | user/qt5-qtvirtualkeyboard/APKBUILD | 13 | ||||
-rw-r--r-- | user/qt5-qtvirtualkeyboard/kde-lts.patch | 188 |
2 files changed, 196 insertions, 5 deletions
diff --git a/user/qt5-qtvirtualkeyboard/APKBUILD b/user/qt5-qtvirtualkeyboard/APKBUILD index 60dc9d2f6..ed9e4dc9b 100644 --- a/user/qt5-qtvirtualkeyboard/APKBUILD +++ b/user/qt5-qtvirtualkeyboard/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=qt5-qtvirtualkeyboard -_pkgname=qtvirtualkeyboard-everywhere-src -pkgver=5.12.9 +_pkgname=qtvirtualkeyboard-everywhere +pkgver=5.15.4 pkgrel=0 pkgdesc="On-screen keyboard module for Qt 5" url="https://www.qt.io/" @@ -12,8 +12,10 @@ license="LGPL-3.0-only WITH Qt-LGPL-exception-1.1 OR GPL-3.0-only WITH Qt-GPL-ex depends="" makedepends="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev" subpackages="$pkgname-dev" -source="https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/$_pkgname-$pkgver.tar.xz" -builddir="$srcdir"/$_pkgname-$pkgver +source="https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/$_pkgname-opensource-src-$pkgver.tar.xz + kde-lts.patch + " +builddir="$srcdir"/$_pkgname-src-$pkgver build() { qmake @@ -24,4 +26,5 @@ package() { make install INSTALL_ROOT="$pkgdir" } -sha512sums="3467ce16e4d1351e27f3b519a25d01939cbfb211a3e63deff1a2b0ea7497dd25cb41ee679672ebef7bba647f457fd46083036e9705637e7d8f36e09f92ec5e8a qtvirtualkeyboard-everywhere-src-5.12.9.tar.xz" +sha512sums="870279299a5e166badea0746a2d4badc758c66f8404e36d1df05997dcfeb66733154fc2a9830c433fbacf885b7afb44bc8dc8a5aacc02713966630ce98231ba3 qtvirtualkeyboard-everywhere-opensource-src-5.15.4.tar.xz +1b0f925421c00578b6884cd98103eeef12461ba6febf1077b8911d034eb61974183b5313d48ddfc60267251e76638b2aa558d3b551b08cdb3db93e317affe201 kde-lts.patch" diff --git a/user/qt5-qtvirtualkeyboard/kde-lts.patch b/user/qt5-qtvirtualkeyboard/kde-lts.patch new file mode 100644 index 000000000..b2a584344 --- /dev/null +++ b/user/qt5-qtvirtualkeyboard/kde-lts.patch @@ -0,0 +1,188 @@ +From 594b1bd20256de146b759aa65d60795ee8542e53 Mon Sep 17 00:00:00 2001 +From: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +Date: Wed, 25 Aug 2021 16:42:32 +0300 +Subject: [PATCH 1/3] Avoid reparenting of InputPanel when the window is being + destroyed + +Fixes: QTBUG-95996 +Pick-to: 5.15 6.1 6.2 +Change-Id: Iac4d06cacf2e672bf4a7676f478798f27ab6f4a2 +Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> +(cherry picked from commit 0464e1bacca28d7e459f105b07fbea6bb5b20930) +--- + src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp +index a7c0aad9..e04c828d 100644 +--- a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp ++++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp +@@ -278,8 +278,10 @@ void QVirtualKeyboardInputContextPrivate::onInputItemChanged() + For integrated keyboards, make sure it's a sibling to the overlay. The + high z-order will make sure it gets events also during a modal session. + */ +- if (isDesktopPanel.isValid() && !isDesktopPanel.toBool()) +- vkbPanel->setParentItem(quickItem->window()->contentItem()); ++ if (isDesktopPanel.isValid() && !isDesktopPanel.toBool()) { ++ if (QQuickWindow *quickWindow = quickItem->window()) ++ vkbPanel->setParentItem(quickWindow->contentItem()); ++ } + } + } + } else { +-- +2.36.0 + +From 1c15d4f231c66d3f39f648942b120159fe7a8be0 Mon Sep 17 00:00:00 2001 +From: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +Date: Mon, 7 Jun 2021 14:04:27 +0300 +Subject: [PATCH 2/3] Fix high CPU utilization caused by key repeat timer + +Key repeat timer has been broken since the beginning. + +The key repeat timer leaked timer instances while processing the event, +causing the accumulation of unprocessed timer events and high CPU +utilization. + +Fix the issue by killing the original timer (long press delay 600 ms) +and starting the key repeat timer (repeat delay 50 ms) once. + +[ChangeLog] Fixed high CPU utilization caused by key repeat timer. + +Pick-to: 5.12 5.15 6.1 6.2 +Fixes: QTBUG-94259 +Change-Id: Iff47249db27cda3750f497cb02c1cb642261e032 +Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +(cherry picked from commit 63a944ff12580f2c333a162ecaecd12419a39c10) +--- + src/virtualkeyboard/qvirtualkeyboardinputengine.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp b/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp +index e64ea4eb..5f74c2a7 100644 +--- a/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp ++++ b/src/virtualkeyboard/qvirtualkeyboardinputengine.cpp +@@ -716,9 +716,11 @@ void QVirtualKeyboardInputEngine::timerEvent(QTimerEvent *timerEvent) + { + Q_D(QVirtualKeyboardInputEngine); + if (timerEvent->timerId() == d->repeatTimer) { +- d->repeatTimer = 0; + d->virtualKeyClick(d->activeKey, d->activeKeyText, d->activeKeyModifiers, true); +- d->repeatTimer = startTimer(50); ++ if (!d->repeatCount) { ++ killTimer(d->repeatTimer); ++ d->repeatTimer = startTimer(50); ++ } + d->repeatCount++; + } + } +-- +2.36.0 + +From e8ae4757dd32e8dbf69a7c57f2bc5c1e238416db Mon Sep 17 00:00:00 2001 +From: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +Date: Tue, 8 Jun 2021 15:25:09 +0300 +Subject: [PATCH 3/3] Fix processing of hard Qt::Key_Backspace and + Qt::Key_Delete + +Even though the virtual keyboard does not support hard keys at the +moment, this kind of processing could be possible in the future. + +In the mean time, fix processing of backspace and delete keys. + +In particular, if such key is pressed the pre-edit text is not empty: + +- Reset input method state (should not modify pre-edit) +- Clear pre-edit +- Return true (to indicate no further processing is required) + +[ChangeLog] Fix processing of hard backspace and delete keys. + +Fixes: QTBUG-94017 +Pick-to: 5.15 6.1 6.2 +Change-Id: I7035f7612e966de6d17d92e754ecd7bdb3a6e530 +Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> +(cherry picked from commit ca5b712dfc8e67aece0eb7374ffe5921e2aa45e8) +--- + .../qvirtualkeyboardinputcontext_p.cpp | 14 ++++++++--- + tests/auto/inputpanel/data/tst_inputpanel.qml | 24 +++++++++++++++++++ + 2 files changed, 35 insertions(+), 3 deletions(-) + +diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp +index e04c828d..cacf33f0 100644 +--- a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp ++++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp +@@ -507,6 +507,7 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event) + QEvent::Type type = event->type(); + if (type == QEvent::KeyPress || type == QEvent::KeyRelease) { + const QKeyEvent *keyEvent = static_cast<const QKeyEvent *>(event); ++ const int key = keyEvent->key(); + + // Keep track of pressed keys update key event state + if (type == QEvent::KeyPress) +@@ -520,7 +521,6 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event) + setState(State::KeyEvent); + + #ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION +- int key = keyEvent->key(); + if ((key >= Qt::Key_Left && key <= Qt::Key_Down) || key == Qt::Key_Return) { + if (type == QEvent::KeyPress && platformInputContext->isInputPanelVisible()) { + activeNavigationKeys += key; +@@ -535,8 +535,16 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event) + #endif + + // Break composing text since the virtual keyboard does not support hard keyboard events +- if (!preeditText.isEmpty()) +- commit(); ++ if (!preeditText.isEmpty()) { ++ if (type == QEvent::KeyPress && (key == Qt::Key_Delete || key == Qt::Key_Backspace)) { ++ reset(); ++ Q_Q(QVirtualKeyboardInputContext); ++ q->clear(); ++ return true; ++ } else { ++ commit(); ++ } ++ } + } + #ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION + else if (type == QEvent::ShortcutOverride) { +diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml +index d814f282..f60acc64 100644 +--- a/tests/auto/inputpanel/data/tst_inputpanel.qml ++++ b/tests/auto/inputpanel/data/tst_inputpanel.qml +@@ -321,6 +321,30 @@ Rectangle { + compare(textInput.text, "A") + } + ++ function test_hardKeyBackspaceClearsInput_data() { ++ return [ ++ { initLocale: "en_GB", initText: "12345", initCursorPosition: 1, inputSequence: "hello", outputText: "12345", expectedCursorPosition: 1 }, ++ ] ++ } ++ ++ function test_hardKeyBackspaceClearsInput(data) { ++ prepareTest(data) ++ ++ if (!inputPanel.wordCandidateListVisibleHint) ++ skip("Prediction/spell correction not enabled") ++ ++ compare(Qt.inputMethod.locale.name, Qt.locale(data.initLocale).name) ++ for (var inputIndex in data.inputSequence) { ++ verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex])) ++ } ++ ++ keyClick(Qt.Key_Backspace) ++ waitForRendering(textInput) ++ ++ compare(textInput.text, data.outputText) ++ compare(textInput.cursorPosition, data.expectedCursorPosition) ++ } ++ + function test_hardKeyInput() { + prepareTest() + +-- +2.36.0 + |