From f9bb92df24e3ed7dee453c59edaa4278193e6e6a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 28 Jan 2015 14:21:44 +0100 Subject: qstandardpaths_ios: add system path for PicturesLocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For PicturesLocation we add a second path pointing to system assets. This url is understood by both QFile (using a dedicated file engine), and QFileDialog, such that if you point the dialog to the url, it will show a native image picker dialog. Change-Id: Ic79393440ab399ed4802cc6d84ec7ad36cbb9369 Reviewed-by: Tor Arne Vestbø --- src/corelib/io/qstandardpaths_ios.mm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qstandardpaths_ios.mm b/src/corelib/io/qstandardpaths_ios.mm index 49dd52acdf..98e939cbda 100644 --- a/src/corelib/io/qstandardpaths_ios.mm +++ b/src/corelib/io/qstandardpaths_ios.mm @@ -122,8 +122,16 @@ QString QStandardPaths::writableLocation(StandardLocation type) QStringList QStandardPaths::standardLocations(StandardLocation type) { QStringList dirs; - const QString localDir = writableLocation(type); - dirs.prepend(localDir); + + switch (type) { + case PicturesLocation: + dirs << writableLocation(PicturesLocation) << QLatin1String("assets-library://"); + break; + default: + dirs << writableLocation(type); + break; + } + return dirs; } -- cgit v1.2.3