qstandardpaths_ios: use fallback for DesktopLocation

NSDesktopDirectory points to a non-existing write-protected path inside
the app sandbox. According to QSP documentation, we should fall back to
use the home directory instead.

Change-Id: I2c370af7758ac043eddcff84aa287eacc754ae38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
bb10
Richard Moe Gustavsen 2015-04-10 12:32:41 +02:00
parent 827232a74d
commit 25311df450
1 changed files with 1 additions and 3 deletions

View File

@ -55,9 +55,6 @@ QString QStandardPaths::writableLocation(StandardLocation type)
QString location;
switch (type) {
case DesktopLocation:
location = pathForDirectory(NSDesktopDirectory);
break;
case DocumentsLocation:
location = pathForDirectory(NSDocumentDirectory);
break;
@ -82,6 +79,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case TempLocation:
location = QString::fromNSString(NSTemporaryDirectory());
break;
case DesktopLocation:
case HomeLocation:
location = bundlePath();
break;