Android: hide() in the QAndroidPlatformMessageDialogHelper destructor

The native dialog window is not being hidden or destroyed when the
QAndroidPlatformMessageDialogHelper object is destroyed. This makes
sure to not leave any native dialogs open.

Pick-to: 6.2 6.3 6.3.0
Task-number: QTBUG-97482
Fixes: QTBUG-101758
Change-Id: I2e50caebd286ea6abd3e948a4873dc3c971626a4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
Assam Boudjelthia 2022-03-30 16:39:40 +03:00
parent 9e1a2b4603
commit a7801fa325
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,11 @@ QAndroidPlatformMessageDialogHelper::QAndroidPlatformMessageDialogHelper()
{
}
QAndroidPlatformMessageDialogHelper::~QAndroidPlatformMessageDialogHelper()
{
hide();
}
void QAndroidPlatformMessageDialogHelper::exec()
{
if (!m_shown)

View File

@ -57,6 +57,8 @@ class QAndroidPlatformMessageDialogHelper: public QPlatformMessageDialogHelper
Q_OBJECT
public:
QAndroidPlatformMessageDialogHelper();
~QAndroidPlatformMessageDialogHelper();
void exec() override;
bool show(Qt::WindowFlags windowFlags,
Qt::WindowModality windowModality,