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

The destroyed signal can be received by a deleted receiver

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.2.2
    • Core: Object Model
    • None

    Description

      When a widget connects itself to the destroyed signal of a child widget using a functor, the slot code is called when the widget itself is destroyed and after its own destructor has been called. This does not happen when connecting using using the SIGNAL/SLOT macros.

      Sample project is included.

      To reproduce:

      1. Load and run the sample project in QtCreator. Note that the qFatal() call inĀ CustomTopWidget::wasDestroyed will be reached.
      2. ChangeĀ constexpr bool SHOW_BUG = true; to false and rerun. This time the qFatal will not be reached.

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            mjbishop Michael Bishop
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes