summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-05-12 14:06:35 +0200
committerAndy Shaw <andy.shaw@qt.io>2020-05-19 23:40:24 +0200
commit77e978001b7caa2c45b8a15e79e81ad5b3173c38 (patch)
tree323f44601738adb48e13e2af554914c3f278be76 /src
parent4c9acd103b0519aa1e5b6d1b2d645fcf66010dcb (diff)
Android: Clear the m_selectedFile variable when showing again
Since the helper is being reused then the m_selectedFile variable should be cleared, otherwise it ends up appending the new result to the old one. Change-Id: I72c24409dc91f91bad55a7da2772605f03fb4623 Pick-to: 5.15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
index 689997f1eb..21e0c47909 100644
--- a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
+++ b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
@@ -203,6 +203,8 @@ bool QAndroidPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::Win
bool isDirDialog = false;
+ m_selectedFile.clear();
+
if (options()->acceptMode() == QFileDialogOptions::AcceptSave) {
m_intent = getFileDialogIntent("ACTION_CREATE_DOCUMENT");
} else if (options()->acceptMode() == QFileDialogOptions::AcceptOpen) {