diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-01-31 17:04:54 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-02-10 16:09:20 +0200 |
commit | a84c895b17089c36f950ae565fd5f6b98bcc7a14 (patch) | |
tree | 7c7a06e546143dd6659b0bb407a6e6ea9c5638dc /src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp | |
parent | 23d42a6a3088904f4d297a98e961fc520d156673 (diff) |
Android: Fix native fileDialog not waiting for user selection
Add an event loop to wait for user file selection in native fileDialog
Task-number: QTBUG-77214
Change-Id: I3d97d6c3f46cf2a8ed0ee6f98e555e8d62e12cc3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp index 7585b7eb95..fb979ab6cc 100644 --- a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp +++ b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp @@ -100,10 +100,13 @@ bool QAndroidPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::Win void QAndroidPlatformFileDialogHelper::exec() { + m_eventLoop.exec(QEventLoop::DialogExec); } void QAndroidPlatformFileDialogHelper::hide() { + if (m_eventLoop.isRunning()) + m_eventLoop.exit(); QtAndroidPrivate::unregisterActivityResultListener(this); } |