From e5eb36feb27500b43f694df3ac1619d36fe8e7ec Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 7 May 2015 13:25:57 +0200 Subject: qstandardpaths_ios: allow empty strings to be returned for undefined locations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/corelib/io/qstandardpaths_ios.mm | 9 --------- 1 file changed, 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; } -- cgit v1.2.3