diff options
| author | Tinja Paavoseppä <tinja.paavoseppa@qt.io> | 2024-10-08 14:39:49 +0300 |
|---|---|---|
| committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2024-10-15 06:21:39 +0000 |
| commit | aef9fff1d7a0de98cb446a634fdf2812e45f19c8 (patch) | |
| tree | cef4dfb3e82d75e5048657732570195aad0c2c9d /src/corelib/thread/qthreadpool.cpp | |
| parent | 846b84ff305dcea31809e2eb0ba00997eb9c8c96 (diff) | |
QtQuick for Android: Do not terminate Qt during configuration change
In Android the default behavior is that when a configuration change,
e.g. an orientation change, happens, the Activity is destroyed and
a new one is created with the new configuration.
In regular Qt for Android, this is not a problem as the QtActivity
overrides this behavior and swicthes the configuration without
recreating the Activity. However in QtQuick for Android i.e.
when adding a QtQuickView to an otherwise regular Android app,
we cannot rely on that being the case. Currently, if for example
the orientation is changed with an Activity that has a QtQuickView
in it and the default behavior is used, it will crash, as the
destruction of the Activity will terminate the Qt runtime, and
whne creating it anew the runtime is not properly restarted.
This patch does not fix the underlying issue of not restaring the
Qt runtime properly, but it adds a check so we don't terminate
it when the reason for the Activity destruction is a configuration
change, as in those cases it will anyway be recreated immediately,
meaning a full termination is too heavyhanded anyway.
Task-number: QTBUG-123711
Pick-to: 6.8
Change-Id: Ia44ab8f55855aa5d54c5fb25e3cca90a9c0feaaa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
0 files changed, 0 insertions, 0 deletions
