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

Regression: After upgrading from 5.5.1 to 5.6.0 QCloseEvent::spontaneous doesn't work.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.6.0 Beta
    • Fix Version/s: None
    • Component/s: QPA: Windows
    • Labels:
      None
    • Environment:
      All

      Description

      I was using the QCloseEvent::spontaneous to determine if the closeEvent was fired but clicking the 'X' in the window frame of the app or in response to QApplication::closeAllWindows();. It used to return true when 'X' was click and false when QApplication::closeAllWindows(); was executed. Now it returns true in both cases which doesn't agree with the documentation.

      $./qtbug53365  <- closeAllWindows() programmatically via button
      "5.6.1 xcb"
      QWidgetWindow(0xe29600, name = "WidgetClassWindow") QCloseEvent(Close, 0x7ffc54edc880) spont= true
      Widget(0x7ffc54ede1d0) QCloseEvent(Close, 0x7ffc54edc370) spont= true
      $ ./qtbug53365  <--Window border close
      "5.6.1 xcb"
      QWidgetWindow(0x255d510, name = "WidgetClassWindow") QCloseEvent(Close, 0x7ffc67416950) spont= true
      Widget(0x7ffc67416dc0) QCloseEvent(Close, 0x7ffc67416440) spont= true
      
      $./qtbug53365   <- closeAllWindows() programmatically via button
      "5.5.1 xcb"
      Widget(0x7fff297736b0) QCloseEvent(Close, 0x7fff29772740) spont= false
      $ ./qtbug53365 <--Window border close
      "5.5.1 xcb"
      QWidgetWindow(0x209be20, name = "WidgetClassWindow") QCloseEvent(Close, 0x7ffd798e4610) spont= true
      Widget(0x7ffd798e4970) QCloseEvent(Close, 0x7ffd798e4330) spont= true
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              ylopes Yoann Lopes
              Reporter:
              niccur Nick Currens
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes