path: root/src/widgets/dialogs/qfiledialog.cpp
diff options
authorRichard Moe Gustavsen <>2016-10-04 15:04:04 +0200
committerRichard Moe Gustavsen <>2016-10-26 08:55:19 +0000
commit78ee77f49122ac525590715a0a034965e3e59adf (patch)
tree0b83e27bf958c154c438b6648a8c2508ff66596c /src/widgets/dialogs/qfiledialog.cpp
parent99ce5d5e85007cb656cd48ab161be14af8f16238 (diff)
iOS: link photo lib plugin based on Info.plist contents
If the application's Info.plist contains the key 'NSPhotoLibraryUsageDescription', we know that we can safely link in qiosnsphotolibrarysupport without violating AppStore requirements. This is a simple feature that doesn't introduce additional qmake API for doing app deployment with optional iOS QPA plugins. [ChangeLog][iOS] Starting from iOS 10, Apple requires all apps that need access to photos to have the key 'NSPhotoLibraryUsageDescription' in the Info.plist. Therefore, to get the same support in Qt (when, e.g., using a file dialog), the Info.plist assigned to QMAKE_INFO_PLIST will need this key as well. Change-Id: I7a93afe24b589cad96d5a1d9e2a155ad1671178a Reviewed-by: Tor Arne Vestbø <> Reviewed-by: Jake Petroules <>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 61f5f7b0d2..f8e4299397 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -896,6 +896,9 @@ void QFileDialogPrivate::_q_goToUrl(const QUrl &url)
a native image picker dialog will be used for accessing the user's photo album.
The filename returned can be loaded using QFile and related APIs.
+ For this to be enabled, the Info.plist assigned to QMAKE_INFO_PLIST in the
+ project file must contain the key \c NSPhotoLibraryUsageDescription. See
+ Info.plist documentation from Apple for more information regarding this key.
This feature was added in Qt 5.5.
void QFileDialog::setDirectory(const QString &directory)