summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths_ios.mm
Commit message (Collapse)AuthorAgeFilesLines
* qstandardpaths_ios: allow empty strings to be returned for undefined locationsRichard Moe Gustavsen2015-05-101-9/+0
| | | | | | | | | | | 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>
* qstandardpaths_ios: return empty path for ApplicationsLocationRichard Moe Gustavsen2015-05-051-1/+1
| | | | | | | | | | There is no ApplicationsLocation on iOS (at least not one that is public API). NSApplicationDirectory just points to a non-existing write-protected path inside the app sandbox. Rather than returning something we know is wrong, it's better to return an empty string. Change-Id: I2ebc151f15509ed5699af05def5c708a56eeaf31 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* qstandardpaths_ios: use fallback for DesktopLocationRichard Moe Gustavsen2015-05-051-3/+1
| | | | | | | | | 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>
* qstandardpaths_ios: return writable locations for Fonts, Music, Movies, ↵Richard Moe Gustavsen2015-05-051-5/+9
| | | | | | | | | | | | | | | | | Pictures and Download QStandardPaths::writableLocation() for FontsLocation, MusicLocation, MoviesLocation, PicturesLocation and DownloadLocation all return directories that point inside the sandbox, but don't exist and cannot be created. In other words, they are not usable for writing or anything else. According to iOS File System Programming Guide (*), such files should instead be located inside Documents, or sub-directories within. (*) https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW4 Task-number: QTBUG-42804 Change-Id: I54145af8058d68e0346d29de5a2bec18dafc21e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qstandardpaths_ios: add system path for PicturesLocationRichard Moe Gustavsen2015-02-151-2/+10
| | | | | | | | | | | For PicturesLocation we add a second path pointing to system assets. This url is understood by both QFile (using a dedicated file engine), and QFileDialog, such that if you point the dialog to the url, it will show a native image picker dialog. Change-Id: Ic79393440ab399ed4802cc6d84ec7ad36cbb9369 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QStandardPaths: add AppConfigLocation.David Faure2015-01-091-0/+1
| | | | | | | | | | | | | | | | | | | ConfigLocation was erroneously inconsistent, by adding the org name and app name on Windows (unintentionally) and not on Unix (while having subdirs in ~/.config is actually common practice for some XDG desktops) Therefore this adds AppConfigLocation, which always has the org name and app name (while GenericConfigLocation never does). [ChangeLog][QtCore][QStandardPaths] Added QStandardPaths::AppConfigLocation, for application-specific configuration directory. ConfigLocation was inconsistent. Task-number: QTBUG-38872 Task-number: QTBUG-38845 Change-Id: I80fb98f296436261f3996c9df87571c29b06ab35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct QStandardPaths::DataLocation return value for iOSSamuel Gaist2014-10-301-0/+2
| | | | | | | | | | | | | | | | | | | 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>
* Add locations AppDataLocation, AppLocalDataLocation to QStandardPaths.Friedemann Kleint2014-04-291-1/+2
| | | | | | | | | | | | | | | | | | | On Windows, DataLocation currently returns the value obtained by passing CSIDL_COMMON_APPDATA to SHGetSpecialFolderPath(). This is the local non-roaming path. For actually storing settings, the roaming path should be used (CSIDL_APPDATA). Introduce new AppDataLocation to return that path and AppLocalDataLocation for the local path and deprecate DataLocation. [ChangeLog][QtCore][QStandardPaths] QStandardPaths now has new enumeration values AppDataLocation, AppLocalDataLocation to be able to differentiate between roaming and local paths on the Windows operating system. DataLocation is deprecated in favor of AppDataLocation. Task-number: QTBUG-38483 Change-Id: Ib1de8c7031a863ed5eac10c747de6f7ff1a090c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QStandardPaths: add GenericConfigLocationDavid Faure2013-11-051-0/+1
| | | | | | | | | | | | | | | | This is what ConfigLocation was meant to be. A directory shared by all applications. Unfortunately when I wrote the fallback on Windows, I picked DataLocation (which is app-specific) instead of GenericDataLocation (which is shared between apps). This makes it impossible to have config files shared between apps, e.g. for libraries. It also makes ConfigLocation quite inconsistent (on Windows one cannot use it to load another app's config file, while it works everywhere else). All this is fixed by GenericConfigLocation, which is shared between apps. Change-Id: I23a755131061d4fea01e13dd1038fbd8ef333a5d Reviewed-by: Alex Richardson <arichardson.kde@googlemail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: Add standard paths implementation for iOSIan Dean2013-10-301-0/+135
A standard paths implementation for iOS. The APIs used on iOS require that the source file be "Objective-C++" (with a .MM extension), as there are no APIs available in C++ for this. The implementation complies with the latest documentation on standard paths. Change-Id: I349d3c5d4ddb6fb1297a45dc9ae26b56ac528abb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>