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

Make QObject::sender() returns non-null with direct Qt::SingleShotConnection

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.2
    • Core: Object Model
    • None
    • Windows

      The method QObject::sender() returns NULL in a slot connected with Qt::SingleShotConnection.

      I think this is because "The pointer returned by this function becomes invalid [...] if the slot is disconnected from the sender's signal."

      So maybe this is not a real bug, but I think it would be helpful for it to work in this scenario as well. I suggest disconnecting the slot after it has been called, not before.

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

            cnn Qt Core & Network
            puffosauro Fabio Dago
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes