[Kde-bindings] Another patch for Qyoto

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Aug 24 13:57:50 UTC 2006


On Thursday 24 August 2006 14:44, Arno Rehn wrote:
> Am Donnerstag, 24. August 2006 12:21 schrieb Richard Dale:
> > On Monday 21 August 2006 21:38, Arno Rehn wrote:
> > > The solution was quite simple: We only need to delete() the C++ qApp
> > > when quitting. Apparently this isn't done by mono. I think this would
> > > require us to create a wrapper instance around our C++ qApp and set
> > > this as the C# qApp. But I think my solution is by far simpler and at
> > > the moment OK. If someone feels like doing it with a wrapper instance,
> > > please do it. That is a for sure a cleaner way than mine.
> >
> > So do we need to add a call in the C# code to invoke DeleteQApp() on
> > exit? I don't see how it works.
>
> Yes, I implemented the call at the end of QApplication.Exec(). Here Is the
> code:
>
> public static new int Exec() {
> 	int ret = StaticQApplication().Exec();
> 	Qyoto.DeleteQApp();
> 	return ret;
> }
>
> As soon as exec() has finished, the QApplication has quit its main loop and
> is about to be destroyed. So now we can delete the C++-qApp and return the
> return value.
Ah yes - I clicked on the attachment, and it offers you to 'open with 
kompare', which it does, but only for the first file in the patch.. So I'll 
change the code generation for QApplication.cs so it includes that call in 
the Exec() method.

-- Richard



More information about the Kde-bindings mailing list