summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add locations AppDataLocation, AppLocalDataLocation to QStandardPaths.Friedemann Kleint2014-04-291-6/+29
| | | | | | | | | | | | | | | | | | | 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>
* Update QStandardPaths documentation with Android paths.Christian Strømme2014-01-231-1/+42
| | | | | | | | Adds example paths for the various locations returned on Android. Change-Id: I55a4e23570c252cbf643596d166c7c43f023ba9c Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Asset Locations to QStandardPaths::DataLocationAlan Alpert2013-12-101-4/+5
| | | | | | | | | | | | | The locations of UI assets are deployed to is being added as a read-only location under DataLocation. As such a path is located differently on certain mobile platforms, such as Android and BlackBerry, having an entry in StandardPaths will make it easier to write cross-platform code. Change-Id: I4533c90ed7157725a8604591595b350c7f616723 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-1/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * QStandardPaths: add GenericConfigLocationDavid Faure2013-11-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QStandardPaths: Add GenericConfigLocation to the documentationDavid Faure2013-11-051-0/+6
| | | | | | | | | | | | | | The actual feature comes from a merge from the stable branch. Change-Id: Id067fb2b26cb3c6b78c7705b77bd741e3bd8f090 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: update the documentation of QStandardPaths to be more thoroughThiago Macieira2013-10-291-20/+178
|/ | | | | | | | | | Specifically, note what paths can be empty and which ones can't (modulo system mis-configuration, like an empty $HOME var) and describe what implications there are for application-specific paths and for global (user) paths. Change-Id: If6c11aab466ba50f3a9685dce52dd51b86426f27 Reviewed-by: David Faure <david.faure@kdab.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add a Qt-API style QStandardPaths::setTestModeEnabledThiago Macieira2013-08-091-0/+11
| | | | | | | | | | | | | | | QStandardPaths::enableTestMode has a verb in the imperative ("enable") as the core word in the name. That indicates an action. The function should not have had a parameter. Instead, add a Qt-style setXXXEnabled function. [ChangeLog][QtCore][QStandardPaths] QStandardPaths::enableTestMode is deprecated and is replaced by QStandardPaths::setTestModeEnabled. Change-Id: Ib26ad72d7c635890d2cb22ae9d44cbda08a6f17c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QStandardPaths (Mac, Windows, Unix) to be bootstrappedThiago Macieira2012-11-021-1/+4
| | | | | | | | | | | | | This allows using QStandardPaths in one of the bootstrapped tools, if required for a future need. The Blackberry version appears to be usable in bootstrapped mode already. Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix compilation: QChar(char) is "from ASCII"Thiago Macieira2012-10-271-1/+1
| | | | | | | This fixes the build if QT_NO_CAST_FROM_ASCII is defined. Change-Id: I0273794a83b0adaa0c15a9910cbcc9ea5d48ef7a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix Windows: QStandardPath::findExecutable() to check suffixes.Friedemann Kleint2012-10-081-33/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Append the Windows executables suffixes from the PATHEXT environment variable. The previous code had a bug since the 'break' statement bailed out of the inner loop only. Factor search code out into a separate functions, avoiding repeated invocations of list.constEnd() and variable assignments in the old code. Add a static function that is called on Unix and on Windows for executable names with a suffix. Call another function applying a candidate list of suffixes in case an executable name without a suffix is passed. Lower case the extensions from PATHEXT, streamline code. Split up the test, add a _data() slot for clarity. Task-number: QTBUG-27457 Change-Id: I2bf34de52aeadddd3b937ad1e22191c3c850fd26 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix a couple of qdoc errors.Lars Knoll2012-08-201-1/+2
| | | | | Change-Id: I0770fc61e265face4fa061be9e110814effee181 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove code duplication in QStandardPaths implementationsDavid Faure2012-08-091-0/+12
| | | | | | | | Using the new getter to access the "test mode" setting. Change-Id: Id26a350cd3fab4bf2e5f58ba67bc7323f99c9cc3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add bool QStandardPaths::isTestModeEnabled()David Faure2012-08-091-0/+9
| | | | | | | | | Library code might need to know this, e.g. when calling an external process, to give it the right configuration. (For instance when ksycoca code calls kbuildsycoca to recreate the DB at the right place). Change-Id: I343ddefff816586f9d391973c08ff1e1ad86bf0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QtCore instead of QtGui for the standardpaths comments to be correctLaszlo Papp2012-08-011-1/+1
| | | | | | | Change-Id: I98004fed565ac9653947ec70a3197b0372abcf2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: David Faure <faure@kde.org>
* update QStandardPaths::standardLocations() documentationJeremy Katz2012-06-111-2/+5
| | | | | | | | | | Remove the reference to PATH, as it may confuse developers who expect a separator between locations. The ordering has been made explicit, including the position of writableLocation() if it can be determined. Note that some implementations may allow the empty string. Change-Id: I134db44dd8bea437824a1d0bf8ed373ec655ab04 Reviewed-by: David Faure <faure@kde.org>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-1/+1
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Allow auto tests to stay away from the user's configuration.David Faure2012-03-281-0/+21
| | | | | | | | | | | | | | | QStandardPaths now knows a "test mode" which changes writable locations to point to test directories, in order to prevent auto tests from reading from or writing to the current user's configuration. This affects the locations into which test programs might write files: GenericDataLocation, DataLocation, ConfigLocation, GenericCacheLocation, CacheLocation. Other locations are not affected. Change-Id: I29606c2e74714360edd871a8c387a5c1ef7d1f54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QStandardPaths: implement displayName() on all platforms.David Faure2012-03-221-0/+42
| | | | | | | | It was only implemented on Mac OSX until now (all this came from the QDesktopServices code). Change-Id: I7fd81d80ca77cf0ca6c213f59813a6163abe7dc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove Symbian specific code from QtCore.Xizhi Zhu2012-01-301-7/+1
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QStandardPaths: add GenericCacheLocation.David Faure2012-01-031-0/+2
| | | | | | | | | | | Much like DataLocation = GenericDataLocation + domain + appname, this makes CacheLocation = GenericCacheLocation + domain + appname. This way a framework library can have an application-independent cache (like ksycoca). Change-Id: I6a8c47ff85b7d5c68b594cc8b071a752d96b029d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStandardPaths: add DownloadLocation.David Faure2011-11-041-1/+2
| | | | | | | | | Only properly implemented on unix (XDG), falls back to Document location on Mac and Windows, because not easily available with the current API being used by either one. Change-Id: Id269f0e3c4e3a68e19205de96c0b39980fde80ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename storageLocation() to writableLocation().David Faure2011-10-231-4/+4
| | | | | Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Add QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)David Faure2011-10-231-2/+2
| | | | | Change-Id: I19c36a04a9deae49ffc20fdec6a2a7eb05155cb4 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Add QStandardPaths::findExecutable.David Faure2011-10-231-0/+87
| | | | | Change-Id: If30a83622e2ac5af48e47a38b8f70fce73044d74 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* QStandardPaths: add Config and GenericData, add methodsDavid Faure2011-10-231-6/+80
| | | | | | | New methods: standardLocations, locate, locateAll. Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Move path information from QDesktopServices (gui) to QStandardPaths (core)David Faure2011-10-231-0/+114
Change-Id: Ic596c21894d83b4dab0c3f5b1aed916ddd590f2f Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>