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

QtWidgets: QEvent::ContextMenu is not spontaneous in 6.9.0 beta 2 anymore

XMLWordPrintable

    • 97605760a (dev), 648dede46 (6.9)

      QtWidgets: QEvent::ContextMenu which was spontaneous in 6.8.1 is not spontaneous in 6.9.0

      spontaneous() is important to Squish as thanks to that flag we know either we have to process the event (record it, for example) or should skip it. We do have exceptions when some events are considered spontaneous even if the flag is unset for different Qt versions / platforms / specific events, that is why I wanted to know if that change in QtWidgets was deliberate or is that a bug and will be fixed in a final 6.9.0 release

      If a ContextMenu event is generated by Qt from an incoming key/mouse event I can understand that it now lost its spontaneous flag. I just want to make sure this particular change in behavior is expected in Qt and we are not seeing an unwanted change (i.e. bug) in Qt right now. We surely can adapt Squish to this change in behavior if that is needed and we already ignore the spontaneous flag on macOS, likely due to the different behavior caused by QMenu<->NSMenu logic

      Q: since applications and components can react to non-spontaneous events, why would squish skip it?
      A: Squish is meant to record user-input only so usually that means only taking events coming from the windowing system (i.e. with the spontaneous flag set) into account. If we would record on all non-spontaneous events we risk to record events that were created by AUT code itself. It's rare but I have seen applications generate fake key/mouse events themselves.

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

            srutledg Shawn Rutledge
            gesemeny Gennadii Semenyshyn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change