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>
bb10
Richard Moe Gustavsen 2015-01-28 14:21:44 +01:00
parent bcda398001
commit f9bb92df24
1 changed files with 10 additions and 2 deletions

View File

@ -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;
}