Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134886

[REG 6.7.3->6.8.2] QEvent::FileOpen no longer received when opening custom URL protocol in Qt 6.8

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.8.2
    • GUI: Drag and Drop, QPA
    • None
    • macOS

    Description

      When opening a URL handled by a custom protocol registered to my application, MyApplication::event no longer receives events of type QEvent::FileOpen. The application does receive QEvent::ApplicationStateChange events correctly.

      This issue occurs in Qt 6.8.2 but does not occur in Qt 6.7.3.
      It has been confirmed on macOS, but may also affect other operating systems.

      Steps to reproduce:
      1. Create a Qt application that registers a custom URL protocol (in Info.plist for macOS)
      2. Implement event handling for QEvent::FileOpen in MyApplication::event
      3. Set up a web redirect from a standard URL to the custom protocol URL
      4. Click on a web link that redirects to the custom protocol
      5. Observe that in Qt 6.8, the application launches but QEvent::FileOpen is not triggered

      Expected behavior:
      The application should receive a QEvent::FileOpen event containing the custom URL, as it did in Qt 6.7.

      Actual behavior:
      The application only receives QEvent::ApplicationStateChange but no QEvent::FileOpen event.

      Additional information:

      • The URL scheme is correctly registered in the Info.plist file
      • The redirection from web URL to custom protocol functions correctly (confirmed with curl)
      • System successfully launches the application when the custom protocol is activated
      • The same code works perfectly with Qt 6.7

      Attachments

        1. logs with qt 6.7.3.png
          logs with qt 6.7.3.png
          165 kB
        2. logs with qt 6.8.2.png
          logs with qt 6.8.2.png
          183 kB
        3. MyApplication.zip
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vuokko Juha Vuolle
            sulian Julien Fond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes