[Qt] Some changes cause errors in qt ide under win32

Paul Ishenin ip at kmiac.ru
Wed Jul 18 11:06:32 CEST 2007


> Paul Ishenin wrote:
> To repeat exception you need to:
> 1. Add TPanel to form (or something else)
> 2. Set hint to "blabla", Set ShowHint to True
> 3. Run application and move mouse over panel
> 4. After showing that "blabla" we get SISIGV
> 
> Everybody wellcome to thurther investigation.
> 

Fixed.

Problem was in EventFilter of Timer function and now I think that most 
of EventFilters have similar bugs.

   if QEvent_type(Event) = QEventTimer then
   begin
     Result := True; <- this line fix crashes


Now quotation from qt documentation:

In your reimplementation of this function, if you want to filter the 
event out, i.e. stop it being handled further, return true; otherwise 
return false.

and later:

Warning: If you delete the receiver object in this function, be sure to 
return true. Otherwise, Qt will forward the event to the deleted object 
and the program might crash.


It is usual situation that timer is deleted on timer event. And so with 
any event that passed to LCL. In event handling code widget that call 
event can be destroyed.

I think now that we must return True in any case of passing event to LCL.

What do you think?

Best regards,
Paul Ishenin.




More information about the Qt mailing list