Android: Fix native open fileDialog crash on Android

Unregister the ActivityResultListener() after the result is handled.

Fixes: QTBUG-78912
Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Assam Boudjelthia 2020-01-31 17:04:54 +02:00
parent 0947cf66e5
commit 6839d297b3

View File

@ -104,6 +104,7 @@ void QAndroidPlatformFileDialogHelper::exec()
void QAndroidPlatformFileDialogHelper::hide() void QAndroidPlatformFileDialogHelper::hide()
{ {
QtAndroidPrivate::unregisterActivityResultListener(this);
} }
QString QAndroidPlatformFileDialogHelper::selectedNameFilter() const QString QAndroidPlatformFileDialogHelper::selectedNameFilter() const