From c66ddd7aba11672336fcbda0b5ee61d568aa1c7a Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 8 Nov 2018 19:06:13 +0100 Subject: [PATCH] Include relevant example code in documentation of setUrlHandler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By only looking at the function prototype, it's tempting to assume that the handler needs to be registered with the usual SLOT macro. That is not the case. The code snippet is already included in the class description, but it doesn't hurt to repeat it here. Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c Fixes: QTBUG-50484 Reviewed-by: Paul Wicking Reviewed-by: Topi Reiniƶ --- src/gui/util/qdesktopservices.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index b6eac91478..8c7cf8682c 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -244,6 +244,8 @@ bool QDesktopServices::openUrl(const QUrl &url) The provided method must be implemented as a slot that only accepts a single QUrl argument. + \snippet code/src_gui_util_qdesktopservices.cpp 0 + 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: