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
parent
827232a74d
commit
25311df450
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue