diff options
Diffstat (limited to 'src/gui/util/qdesktopservices.cpp')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 1056fa0..84aa16e 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -157,6 +157,11 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser. + The following example opens a file on the Windows file system residing on a path + that contains spaces: + + \snippet doc/src/snippets/code/src_gui_util_qdesktopservices.cpp 2 + If a \c mailto URL is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL, similar to the way \c mailto links are handled by a Web browser. @@ -280,6 +285,17 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) \note The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user. + + \note On Mac OS X, DataLocation does not include QCoreApplication::organizationName. + Use code like this to add it: + + \code + QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + #ifdef Q_WS_MAC + location.insert(location.count() - QCoreApplication::applicationName().count(), + QCoreApplication::organizationName() + "/"); + #endif + \endcode */ /*! |