[Kde-bindings] Using threads with QtRuby

Uriel uriel at inbox.ru
Fri Feb 5 17:42:34 UTC 2010


> Looks a good idea. Maybe rather than alias the standard exec() we 
> could add an
> exec_with_threads() method?
The whole point of making it 'smarter' for me was just to get rid of the 
bunch of such lines in debug output:
...
getPointerObject 0x9019c08 -> 0x91d68fc
module: qt virtual 0x9019c08->QApplication::notify(QObject*, QEvent*) called
getPointerObject 0x9019c08 -> 0x91d68fc
module: qt virtual 0x9019c08->QApplication::event(QEvent*) called
getPointerObject 0x9019c08 -> 0x91d68fc
module: qt virtual 0x9019c08->QObject::timerEvent(QTimerEvent*) called
getPointerObject 0xbf960750 -> nil
allocating Qt::TimerEvent 0xbf960750 -> 0x93b6380
...Thousands of them :)...

Aliasing was just an example of external extension of this class - we 
still could just change the source code of the binding.
I've looked into GtkRuby binding and haven't found anything special 
there. In their Gtk.main method they just calling the native method 
gtk_main and that's all.
Anyway I don't think that we should extend the original Qt's API without 
very significant reason for doing this.
I'll try to implement a mechanism I've described above to make an 
overhead of this solution as small as possible.



More information about the Kde-bindings mailing list