Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.0 Beta 2
-
None
Description
It doesn't look right:
// Used by QAccessibleWidget QObjectList QObjectPrivate::receiverList(const char *signal) const { Q_Q(const QObject); QObjectList returnValue; int signal_index = signalIndex(signal); if (signal_index < 0) return returnValue; QMutexLocker locker(signalSlotLock(q)); if (connectionLists) { if (signal_index < connectionLists->count()) { const QObjectPrivate::Connection *c = connectionLists->at(signal_index).first; while (c) { if (c->receiver) returnValue << c->receiver; c = c->nextConnectionList; } } } return returnValue; }
It is indeed used only by QAccessibleWidget and has no autotest, so a bug might go unnoticed.
I wanted to use it to find connections to signals from Pointer Handlers in Qt Quick (which may or may not be a good idea) and in one case I could see that signal_index == 20 but connectionLists is a QVector<QObjectPrivate::ConnectionList>, each of which can have multiple connections. connectionLists->count() == 1 in this case, but that's not the whole count of all connections, so it doesn't seem like the right comparison to be doing here.