diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2021-08-25 16:42:32 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-31 19:38:17 +0000 |
commit | a7f8a81d71bf3c1bc544b4d23a5198c7a9dabeb8 (patch) | |
tree | 9533bb6dacbd0a614610591c358cf44296c96805 | |
parent | dc84cfaf080d7ccd5d59b8553c25c1db746ee4fb (diff) |
Avoid reparenting of InputPanel when the window is being destroyed
Fixes: QTBUG-95996
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)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp index 4de9c778..028f3f71 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 { |