diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-01-28 14:21:44 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-02-15 11:12:12 +0000 |
commit | f9bb92df24e3ed7dee453c59edaa4278193e6e6a (patch) | |
tree | fba0d9ebec5d3dd4d314b88e03efd3abc214caff | |
parent | bcda3980016e98e0078fedb83e77047e296c8713 (diff) |
qstandardpaths_ios: add system path for PicturesLocation
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ø <tor.arne.vestbo@theqtcompany.com>
-rw-r--r-- | src/corelib/io/qstandardpaths_ios.mm | 12 |
1 files 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; } |