Allow unhandled custom uri-scheme opens to create QFileInfoEvent

On macOS custom uri-scheme opens may generate a QFileOpenEvent that
the applications can handle. However when adding support also for
QDesktopServices::setUrlHandler(), this delivery mechanism stopped
from working because the event was unconditionally consumed /
delivered to only the url handler.

Instead change the logic such that if the url handler does not
handle it, allow a QFileInfoEvent to be created.

Amends: 664c7ffb212eb898ed03f7b19c883400fa027b6b

Fixes: QTBUG-134316
Pick-to: 6.9.0 6.8 6.8.3
Change-Id: Ib1ed371ef531586bf549cf473b2a54748584d91d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 4755f52c08aac424b18ad94404ca8f7dabf8220d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Juha Vuolle 2025-03-06 15:16:20 +02:00 committed by Qt Cherry-pick Bot
parent 15ea46495f
commit 0c7bea06c4

View File

@ -343,8 +343,8 @@ QT_USE_NAMESPACE
return;
QCocoaIntegration *cocoaIntegration = QCocoaIntegration::instance();
Q_ASSERT(cocoaIntegration);
cocoaIntegration->services()->handleUrl(QUrl(qurlString));
return;
if (cocoaIntegration->services()->handleUrl(QUrl(qurlString)))
return;
}
// The string we get from the requesting application might not necessarily meet