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

Mac: Select All, Cut, Copy and Paste key shortcuts don't work in AA_PluginApplication mode, crash the app

    XMLWordPrintable

Details

    • macOS

    Description

      Tl;dr: the QNSView_Menu.mm code should not return YES on respondsToSelector for cut,copy,pase commands IF the application is running in plugin mode, AA_PluginApplication.

      Details:

      Apps written with Cocoa that have the default Edit menu implemented using NSMenu and NSMenuItem that later add Qt as a plugin will incorrectly show the Edit menu commands available while focus is in a QNSView-based window.

      When the user tries to use the keyboard shortcuts for the cut/copy/paste/select all commands, e.g. on a QtQuick TextField, instead of the TextField control handling the commands they get intercepted by the QNSView which attempts to treat them as if coming from a QCocoaMenu/QCocoaNSMenuItem instance.

      The code in -[QNSView forwardInvocation] then ends up crashing because it forwards the call to the super class without first checking if it responds to the selector.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            cosminp Cosmin Pancratov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes