[Lazarus] qt45 lclwebkit2

Den Jean Den.Jean at telenet.be
Wed Sep 30 19:54:05 CEST 2009


> And I must tell you that some strange ide crashes (linux with pretty old Xorg 
> 6.8.2) which happens before 1.72 just dissapeared with new hooks

 :-[ as already mentioned on the LCL/Qt ML I also fixed a bug (since V1.71)

The type safe calling should not change anything to existing correct code. It just verifies 
at compile time that the signature of the provided Pascal Method is of the correct type.

Hooking a signal of a Qt Object X to a Pascal Object Method, works by creating
a hooking object HOOK written in Qt/C++, that stores the address of 
the Pascal Object Method and the address/handle of the Qt Object X.
 
The HOOK connects to the signal of X and calls the Pascal method when the signal occurs.

In the destructor of the hook, I disconnected from the Qt Object X. But in the
mean time the stored handle to X could have become invalid, if the Qt Object X had been destroyed.

Now the HOOK also connects to the destroyed signal of X, and invalidates the handle to it, upon
reception of that destroyed signal.


> (yes, I can 
> reproduce that each time before 1.72 , now I cannot - so it seem to be nice 
> thing with new signal hooking) :))))
> 

If you can reproduce it easily, you could enable the debugging printfs I left 
in qobject_hook.h and verify it is related to this bug fix.
http://lists.lazarus.freepascal.org/pipermail/qt/2009-September/001272.html

regards,

Den Jean




More information about the Lazarus mailing list