statemachine: Avoid warning when setting up signal transition
If the sender object was set, but not the signal signature, the registration would proceed anyway, producing a strange warning like QSignalTransition: no such signal: MyObject:: Change-Id: If0b113bdb60dd770d60b0d38d509b673e9d8c5eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
parent
0d56dac3bc
commit
58bea0b8e0
@ -1692,6 +1692,8 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio
|
||||
if (!sender)
|
||||
return;
|
||||
QByteArray signal = QSignalTransitionPrivate::get(transition)->signal;
|
||||
if (signal.isEmpty())
|
||||
return;
|
||||
if (signal.startsWith('0'+QSIGNAL_CODE))
|
||||
signal.remove(0, 1);
|
||||
const QMetaObject *meta = sender->metaObject();
|
||||
|
Loading…
Reference in New Issue
Block a user