Edwin Leuven wrote: > Edwin Leuven wrote: >> can anyone explain to me what this line: >> >> wa_ptr = this; >> >> in "void QWorkArea::haveSelection(bool)" >> >> does? > > stupid question?
Pretty dumm ;-) At a quick look, it looks to me like wa_ptr (work area pointer?) is a hack. Also at a quick look, it means that QWorkArea is effectively a singleton class. Ie, there can be only one instance of the class in existence. The primary usage of wa_ptr is here: bool lyxX11EventFilter(XEvent * xev) { switch (xev->type) { case SelectionRequest: lyxerr[Debug::GUI] << "X requested selection." << endl; if (wa_ptr) wa_ptr->selectionRequested(); break; case SelectionClear: lyxerr[Debug::GUI] << "Lost selection." << endl; if (wa_ptr) wa_ptr->selectionLost(); break; } return false; } -- Angus