summaryrefslogtreecommitdiffstats
path: root/src/gui/util
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-09-03 14:02:13 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-10-15 10:55:18 +0000
commit1f6bfc220774e9407fe88916843b76ed103cff72 (patch)
tree8d6157d5b974e6045d75a716f8eb0db4daefa35f /src/gui/util
parent02a214442781bf112c1cc85d2470c6fcec8ed207 (diff)
Doc: Move literal code block to a separate file
We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qdesktopservices.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index de9d087c21..b6eac91478 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -187,12 +187,7 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
\l{https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl}{canOpenURL(_:)}.
For example, the following lines enable URLs with the HTTPS scheme:
- \code
- <key>LSApplicationQueriesSchemes</key>
- <array>
- <string>https</string>
- </array>
- \endcode
+ \snippet code/src_gui_util_qdesktopservices.cpp 3
\sa setUrlHandler()
*/
@@ -252,17 +247,7 @@ bool QDesktopServices::openUrl(const QUrl &url)
To use this function for receiving data from other apps on iOS you also need to
add the custom scheme to the \c CFBundleURLSchemes list in your Info.plist file:
- \code
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>myapp</string>
- </array>
- </dict>
- </array>
- \endcode
+ \snippet code/src_gui_util_qdesktopservices.cpp 4
For more information, see the Apple Developer Documentation for
\l{https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content/communicating_with_other_apps_using_custom_urls?language=objc}{Communicating with Other Apps Using Custom URLs}.
@@ -346,14 +331,9 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
wasn't called, while in Qt 5 it defaults to the name of the executable.
Therefore, if you still need to access the Qt 4 path (for example for data migration to Qt 5), replace
- \code
- QDesktopServices::storageLocation(QDesktopServices::DataLocation)
- \endcode
+ \snippet code/src_gui_util_qdesktopservices.cpp 5
with
- \code
- QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
- "/data/organization/application"
- \endcode
+ \snippet code/src_gui_util_qdesktopservices.cpp 6
(assuming an organization name and an application name were set).
*/