Uploaded image for project: 'Qt Solutions'
  1. Qt Solutions
  2. QTSOLBUG-183

Windows MFC migration framework: qmfcapp::wineventFilter calls PreTranslateMessage unnecessarily

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Next Major Release, Some Release
    • MFC Migration
    • None
    • Windows 7 64 Bit

    Description

      When the main window of an MFC application has shortcuts and you open a modal Qt dialog on top of it from the menu, the shortcuts get evaluated and executed, which is not what you want when a modal dialog is open.

      This is caused by the call to PreTranslateMessage in wineventFilter (coming from the event-loop of the modal dialog, which is unnecessary when the message is sent in a Qt-only context.

      I have provided a patch that fixes this to the best of my knowledge.

      Hint for reproduction:
      It's necessary that the Qt dialog be opened from the menu and not a button or shortcut, because otherwise the main event-loop will already go through wineventFilter and it won't go recursively because it has a recursion guard.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jam Jakob Magiera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes