Reject a method index that does not denote a signal


findSignal() is documented to verify that the index it is given denotes
a signal, but enforced that only with Q_ASSERT so a release build
accepted any method index. The index arrives from the peer in a
connectToSignal message, and connectTo() then caches argument types that
do not belong to the connected signal.

Return an invalid QMetaMethod instead, which connectTo() already
refuses.

Pick-to: 6.12 6.8
Fixes: QTBUG-151393
Change-Id: I2e2438ad644df19f96547c93623867c5c29b5cf2
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
commitbfc109da3455dc10299f5ec9587bae1f21f9f64d
parent5824a154d5b69dbbe74ae2121d96a770c5711248
authorMagdalena Stojek <magdalena.stojek@qt.io>
committerMagdalena Stojek <magdalena.stojek@qt.io>
commit timeWed, 14 Oct 2026 13:14:54 +0000