summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2024-01-02 18:11:03 +0100
committerQt Cherry-pick Bot <[email protected]>2024-01-15 08:12:04 +0000
commit330503085a40e3a270ffc2d79cabf33a462bfa04 (patch)
tree7a9920a16f79bae3f9654814b83135bdccd19a6f
parent06edd8a24b9a2bcc9bd68a5136d96727a362b149 (diff)
Fix opening temporary content: URIs from application content providers
e5d591a0d09 focused on document or tree URIs you'd get from the file dialog, but we can also get ones via Intents from application-specific content providers (e.g. opening an attachment from an email client). Those need to be handled like a single document here, parsing them like a tree URI results in a bunch of Java exceptions down the line. Change-Id: I19cb1075fd6a3ccad927543f8bc5a63566f4877e Reviewed-by: Assam Boudjelthia <[email protected]> (cherry picked from commit 9d4a34bbbe7ec39ef594b07aae06fc1029cc6e3d) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 33b4c2d4af90d255b59ac79175c145f0e3299915) (cherry picked from commit ec35827669972c5655d67862d2770a862afd7fb1)
-rw-r--r--src/plugins/platforms/android/androidcontentfileengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/androidcontentfileengine.cpp b/src/plugins/platforms/android/androidcontentfileengine.cpp
index 6bd4051397a..782fdb762e6 100644
--- a/src/plugins/platforms/android/androidcontentfileengine.cpp
+++ b/src/plugins/platforms/android/androidcontentfileengine.cpp
@@ -608,7 +608,7 @@ DocumentFilePtr DocumentFile::parseFromAnyUri(const QString &fileName)
const QString encodedUri = QUrl(fileName).toEncoded();
const QJniObject uri = parseUri(encodedUri);
- if (DocumentsContract::isDocumentUri(uri))
+ if (DocumentsContract::isDocumentUri(uri) || !DocumentsContract::isTreeUri(uri))
return fromSingleUri(uri);
const QString documentType = "/document/"_L1;