diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-01-15 17:34:05 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-01-28 16:27:43 +0000 |
commit | a8aca8196f2d3dc18bc378a196b4429b2e38067c (patch) | |
tree | 99680a4143014c9c212bf5ac4463bd9b162cf6f6 | |
parent | f36555f077d215dbef0ebd36b8f7a5877528d1cc (diff) |
Doc: add docs for QDesktopServices JavaScript object
Based on Qt 5 documentation for QDesktopServices.
Change-Id: Ib1a42505b1c046b5175aae0a76f3c71d58c0e86f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
-rw-r--r-- | src/libs/installer/scriptengine.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 6d776db88..6a6a18fd8 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -169,10 +169,23 @@ namespace QInstaller { /*! \qmltype QDesktopServices \inqmlmodule scripting -*/ -/*! - \qmlproperty enumeration QDesktopServices::QStandardPaths + \brief Provides methods for accessing common desktop services. + + Many desktop environments provide services that can be used by applications + to perform common tasks, such as opening a file, in a way that is both + consistent and takes into account the user's application preferences. + + This object contains methods that provide simple interfaces to these + services that indicate whether they succeeded or failed. + + The openUrl() method is used to open files located at arbitrary URLs in + external applications. For URLs that correspond to resources on the local + filing system (where the URL scheme is "file"), a suitable application is + used to open the file. + + The displayName() and storageLocation() methods take one of the following + enums as an argument: \list \li DesktopServices.DesktopLocation @@ -193,18 +206,34 @@ namespace QInstaller { \li DesktopServices.GenericCacheLocation \li DesktopServices.GenericConfigLocation \endlist + + The enum values correspond to the values of the + \l{QStandardPaths::StandardLocation} enum with the same names. +*/ + +/*! + \qmlproperty enumeration QDesktopServices::QStandardPaths + \internal */ /*! \qmlmethod boolean QDesktopServices::openUrl(string url) + + Uses the URL scheme \c file to open the specified \a url with a suitable + application. */ /*! \qmlmethod string QDesktopServices::displayName(int location) + + Returns a localized display name for the specified \a location or an empty + QString if no relevant location can be found. */ /*! \qmlmethod string QDesktopServices::storageLocation(int location) + + Returns the specified \a location. */ /*! |