Fix fallover case for TQEvent::MetaCall

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/191/head
Michele Calgaro 3 months ago
parent 0d546f99ae
commit 24b42848c1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1094,6 +1094,7 @@ bool TQObject::event( TQEvent *e )
case TQEvent::MetaCall: case TQEvent::MetaCall:
{ {
bool handled = false;
TQMetaCallEvent* metaEvent = dynamic_cast<TQMetaCallEvent*>(e); TQMetaCallEvent* metaEvent = dynamic_cast<TQMetaCallEvent*>(e);
if (metaEvent) { if (metaEvent) {
#ifdef TQT_THREAD_SUPPORT #ifdef TQT_THREAD_SUPPORT
@ -1116,10 +1117,14 @@ bool TQObject::event( TQEvent *e )
#endif // TQT_THREAD_SUPPORT #endif // TQT_THREAD_SUPPORT
} }
TQUObject *o = metaEvent->data(); TQUObject *o = metaEvent->data();
if (metaEvent->type() == TQMetaCallEvent::MetaCallEmit) { if (metaEvent->type() == TQMetaCallEvent::MetaCallEmit)
{
handled = true;
tqt_emit( metaEvent->id(), o ); tqt_emit( metaEvent->id(), o );
} }
if (metaEvent->type() == TQMetaCallEvent::MetaCallInvoke) { else if (metaEvent->type() == TQMetaCallEvent::MetaCallInvoke)
{
handled = true;
tqt_invoke( metaEvent->id(), o ); tqt_invoke( metaEvent->id(), o );
} }
if ( sol ) if ( sol )
@ -1152,6 +1157,7 @@ bool TQObject::event( TQEvent *e )
#endif // TQT_THREAD_SUPPORT #endif // TQT_THREAD_SUPPORT
destroyDeepCopiedTQUObjectArray(metaEvent->data()); destroyDeepCopiedTQUObjectArray(metaEvent->data());
} }
return handled;
} }
default: default:

Loading…
Cancel
Save