Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Ahmed El Khazari 6f0d27d2e4 Android: Fix crash when parent window is detached but view reference remains
This commit addresses a crash that occurs when the parent window is
destroyed while the view reference is still held. The crash happens when
the callback onAttachedToWindow is triggered and the
QuickView.createQuickView() function is called in native code. In this
scenario, the view reference is still pointing to the previous QuickView
whose parent has already been cleared, causing the crash.

To fix this, we reset the reference to 0 when the parent is deleted or
destroyed. This ensures that when onAttachedToWindow is called again,
the view is properly recreated after its underlying window has been
destroyed.

Fixes: QTBUG-138922
Change-Id: Ia39eb83b58af19cd9b881915215b2be2adcfee49
(cherry picked from commit 8194e979fc58f71244f625f320a797d4550524c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e205d6b2ac)
(cherry picked from commit e893262b06)
2025-08-17 16:16:08 +00:00
.github/workflows
LICENSES Add REUSE.toml files 2024-11-05 14:36:16 +01:00
bin CMake: Don't hard-code "libexec" in qt-configure-module 2024-08-16 12:36:35 +02:00
cmake CMake: Add warnings as errors support for example builds 2025-08-04 10:32:14 +00:00
coin Build doc tools first 2025-07-06 08:53:25 +00:00
config.tests Add copyright holder to the SPDX line 2025-03-06 02:45:25 +00:00
dist Add REUSE.toml files 2024-11-05 14:36:16 +01:00
doc Doc: Update link from VxWorks to Qt Creator documentation when QC 17.0 is released 2025-07-31 17:26:29 +00:00
examples Add missing qquaternion.h includes 2025-06-30 23:50:48 +00:00
lib
libexec qt-android-runner.py: handle all possible Gradle namespace formats 2025-08-02 14:06:13 +00:00
mkspecs Remove relics of objc_namespace script 2025-07-31 17:26:27 +00:00
qmake Fail builds on Apple platforms with invalid Info.plist 2025-07-09 07:58:36 +00:00
src Android: Fix crash when parent window is detached but view reference remains 2025-08-17 16:16:08 +00:00
tests Http: Remove incomplete cache-objects on destruction 2025-08-05 11:49:53 +00:00
util PSL update script: Change to use direct upstream source 2025-07-16 18:44:49 +00:00
.cmake.conf Bump version to 6.9.2 2025-05-09 07:47:06 +01:00
.gitattributes
.gitignore Fix .gitignore to ignore any build dir under the repo or its subdirs 2025-07-23 02:46:25 +00:00
.gitreview Add .gitreview file 2025-03-25 08:40:27 +00:00
.lgtm.yml
.tag
CMakeLists.txt CMake: Don't unconditionally enable the ASM language 2025-05-03 01:24:12 +00:00
REUSE.toml Update licensing of files with infrastructure type 2025-03-12 15:16:35 +00:00
config_help.txt Introduce emoji-segmenter to 3rdparty code 2024-11-18 15:52:13 +01:00
configure Do not assume FHS in scripts 2024-06-25 11:44:00 +02:00
configure.bat configure.bat: Use call when calling the helper cmake scripts 2025-01-30 21:18:49 +00:00
configure.cmake Build system: support C++2c 2025-07-07 21:55:34 +00:00
dependencies.yaml
licenseRule.json Fix typo in licenseRule.json 2025-07-18 12:56:48 +00:00
qt_cmdline.cmake Build system: support C++2c 2025-07-07 21:55:34 +00:00