qstandardpaths_ios: allow empty strings to be returned for undefined locations
According to the documentation for QStandardPaths::standardLocations() and QStandardPaths::writableLocation, they should return empty lists / strings if the location cannot be determined. So remove the section in qstandardpath_ios.mm that always sets a default path for undefined locations. Change-Id: I0c7fc0a1a0bbe2a5e0fb4e79e0f96f0280a647e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
parent
6eaee855c7
commit
e5eb36feb2
@ -103,18 +103,9 @@ QString QStandardPaths::writableLocation(StandardLocation type)
|
||||
// NSDownloadsDirectory points to a non-existing write-protected path.
|
||||
location = pathForDirectory(NSDocumentDirectory) + QLatin1String("/Download");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case RuntimeLocation:
|
||||
break;
|
||||
default:
|
||||
// All other types must return something, so use the document directory
|
||||
// as a reasonable fall-back (which will always exist).
|
||||
if (location.isEmpty())
|
||||
location = pathForDirectory(NSDocumentDirectory);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user