diff options
Diffstat (limited to 'src/gui/util')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 379d18dd60..7ca138b1b7 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -18,8 +18,6 @@ #include <qpa/qplatformintegration.h> #include <qdir.h> -#include <QtCore/private/qlocking_p.h> - QT_BEGIN_NAMESPACE class QOpenUrlHandlerRegistry @@ -36,36 +34,10 @@ public: }; typedef QHash<QString, Handler> HandlerHash; HandlerHash handlers; - -#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0) - QObject context; - - void handlerDestroyed(QObject *handler); -#endif - }; Q_GLOBAL_STATIC(QOpenUrlHandlerRegistry, handlerRegistry) -#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0) -void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) -{ - const auto lock = qt_scoped_lock(mutex); - HandlerHash::Iterator it = handlers.begin(); - while (it != handlers.end()) { - if (it->receiver == handler) { - it = handlers.erase(it); - qWarning("Please call QDesktopServices::unsetUrlHandler() before destroying a " - "registered URL handler object.\n" - "Support for destroying a registered URL handler object is deprecated, " - "and will be removed in Qt 6.6."); - } else { - ++it; - } - } -} -#endif - /*! \class QDesktopServices \brief The QDesktopServices class provides methods for accessing common desktop services. @@ -238,6 +210,7 @@ bool QDesktopServices::openUrl(const QUrl &url) the destruction of the handler object does not overlap with concurrent invocations of openUrl() using it. + \target configuring qdesktopservices url handler on ios and macos \section1 iOS and \macos To use this function for receiving data from other apps on iOS/\macos @@ -267,6 +240,7 @@ bool QDesktopServices::openUrl(const QUrl &url) For more information, see the Apple Developer Documentation for \l {iOS: Supporting Associated Domains}{Supporting Associated Domains}. + \target configuring qdesktopservices url handler on android \section1 Android To use this function for receiving data from other apps on Android, you @@ -307,11 +281,6 @@ void QDesktopServices::setUrlHandler(const QString &scheme, QObject *receiver, c h.receiver = receiver; h.name = method; registry->handlers.insert(scheme.toLower(), h); -#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0) - QObject::connect(receiver, &QObject::destroyed, ®istry->context, - [registry](QObject *obj) { registry->handlerDestroyed(obj); }, - Qt::DirectConnection); -#endif } /*! |