diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-05-07 13:25:57 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-05-10 18:15:49 +0000 |
commit | e5eb36feb27500b43f694df3ac1619d36fe8e7ec (patch) | |
tree | 4ddb2c9f0011e37ed5b24831874f07d33130cf32 /src | |
parent | 6eaee855c7e2da8ed9385f0c68c8823b103d5195 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qstandardpaths_ios.mm | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/corelib/io/qstandardpaths_ios.mm b/src/corelib/io/qstandardpaths_ios.mm index 6e53b75df4..eb85e2fd23 100644 --- a/src/corelib/io/qstandardpaths_ios.mm +++ b/src/corelib/io/qstandardpaths_ios.mm @@ -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; } |