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

QObject signals: make signal ID available in addition to sender()

    XMLWordPrintable

Details

    Description

      For some use cases it would be useful to in some way have an ID of the signal that is being sent, such that they can be distinguished. That is, to make available the information QObjectPrivate::Sender has. Customer writes:

      It would be very useful if there would also be a QObject::senderSignal() function which could provide the other information of this struct, namely the ID (or alternatively the signature) of the signal which called the slot. I could very much use this for a n:1 signal > slot mapping where I have n signals which all have the same parameter types and count and just one slot responding to it (I connect these dynamically via QMetaObject introspection). I could work around this issue if the task 133147 would get implemented ever (I'd just give the slot one more argument which I'd statically fill with the signal's name), but I guess making QObjectPrivate::currentSender>signal public is much easier.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            fenglich Frans Englich (closed Nokia identity)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes