Am Samstag, 3. Juni 2006 12:49 schrieb Abdelrazak Younes: > Georg Baum wrote: > > Abdelrazak Younes wrote: > > > >> AFAIS, wa_ptr is equivalent to "this" and is not used anywhere else. > > > > It is used in lyxX11EventFilter > > Could be replaced by "this".
Only if you make lyxX11EventFilter a member of QWorkarea, but that would mean you'll need something equivalent to wa_ptr in LQApplication. > and handleOpenDocuments, I _know_. I plan to move these function to > "lyx_gui.C" or "WorkAreaFactory.C". Then you should have written that. > > Figuring out the reason why it is needed there is left as an > > exercise for the reader. > > Well, my point is that it is not used anywhere else but in > "QWorkarea.C". In there, maintaining a global variable pointer is > useless as there is anyway only one QWorkArea instance in LyX and it is > created in WorkAreaFactory.C. Ultimately, I plan to remove this global > variable. How would LQApplication::x11EventFilter then work? > I am not going blindly here and I think I know the code quite well so in > this case I need a bit more argument than "No" ;-) If you had given the full details my answer would not have been a simple "No" (although I still don't see how it is possible to get rid of wa_ptr). Georg