Correct QStandardPaths::DataLocation return value for iOS

Currently DataLocation returns the same value as DocumentsLocation which
doesn't fit the purpose for what should go in this directory. This patch
aims to correct that. On a side note, it will also be more inline with
OS X current behavior

[ChangeLog][QtCore][iOS] Fixed path to QStandardPaths::DataLocation.
Until now DataLocation was pointing to the Document directory. With this
patch, it will return the more accurate Library/Application Support.
Application making use of DataLocation should move these data to the new
location. This can be done using the path provided by DocumentLocation as
source path.

Task-number: QTBUG-42276
Change-Id: I35415643cf8cc7a60528f9b0fb5028ada5deace0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: David Faure <david.faure@kdab.com>
bb10
Samuel Gaist 2014-10-29 23:33:50 +01:00
parent 136ccaa276
commit 6ee73677b2
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ QString QStandardPaths::writableLocation(StandardLocation type)
break;
case AppDataLocation:
case AppLocalDataLocation:
location = pathForDirectory(NSApplicationSupportDirectory);
break;
case GenericDataLocation:
location = pathForDirectory(NSDocumentDirectory);
break;