Kuba Ober wrote: >> The xforms event loop in my tree now looks like: >> >> while (!finished) { >> ForkedcallsController::get().handleCompletedProcesses(); >> if (fl_check_forms() == FL_EVENT) { >> ... >> } >> } >> >> where handleCompletedProcesses() simply checks whether a SIGCHLD >> signal has been received and, if so, cleans up after it. >> (handle_children is set to true in the handler receiving a SIGCHLD >> signal.) > > [...] >> 2. How do I do this for Qt, given that the xforms event loop above >> is replaced with >> >> qApp->exec(); > > In this direct approach I presume you need to somehow derive from > (or make a copy of) QEventLoop and put the relevant magic in there.
Thanks Kuba. It turns out that QEventLoop exists only for Qt >= 3.1. I'm running RH8 here (Qt 3.0.5). For Qt < 3.1, the trick seems to be to use a QTimer with 0 timeout. That *does* work. I have written the code using QEventLoop for Qt >= 3.1, but obviously I can't test it. Could I get you to do so? (Patch attached.) If it works, then launching lyx will cause an interminable stream of "child_processes()" messages to be printed to console and eps graphics should be rendered asynchronously on the lyx screen. > I also presume that QProcess takes care of all that one way or > another, so maybe ForkedcallsController could just use QProcess > instead if on Qt? That would make life simpler methinks. Let's try and avoid that if we can. > Cheers, Kuba Ober -- Angus
forks.diff.gz
Description: GNU Zip compressed data