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

Add support for QObject::disconnect() non-member function pointers

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.0
    • Core: Object Model
    • None
    • All

    Description

      when you connect a signal to a slot that is a static function, you can do something like this:

      connect(pointertosender, &SenderType::signal, &ReceivingClass::staticslot);

       

      so you would expect that to disconnect that connection, you would use

      disconnect(pointertosender, &SenderType::signal, &ReceivingClass::staticslot);

       

      but that does not work because 

      no matching function for call to 'disconnect'

       

      is it that when allowing for connecting static slots in the upgrade to Qt 5, you forgot to add support for disconnecting the connections?

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            infinityintegral Infinity Integral
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes