qstandardpaths_ios: return empty path for ApplicationsLocation

There is no ApplicationsLocation on iOS (at least not one that
is public API). NSApplicationDirectory just points to a non-existing
write-protected path inside the app sandbox. Rather than returning something
we know is wrong, it's better to return an empty string.

Change-Id: I2ebc151f15509ed5699af05def5c708a56eeaf31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2015-04-10 12:51:04 +02:00
parent 25311df450
commit 12970e0312

View File

@ -62,7 +62,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
location = pathForDirectory(NSDocumentDirectory) + QLatin1String("/.fonts");
break;
case ApplicationsLocation:
location = pathForDirectory(NSApplicationDirectory);
// NSApplicationDirectory points to a non-existing write-protected path.
break;
case MusicLocation:
// NSMusicDirectory points to a non-existing write-protected path. Use sensible fallback.