Fix bug #6431: Crash when closing a workarea with a pending completion popup.

The GuiCompleter has to have a parent, otherwise it is not destroyed when a GuiWorkArea is destroyed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32952 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-01-10 19:33:18 +00:00
parent f2f471cd63
commit 72c42b0624

View File

@ -239,7 +239,7 @@ GuiWorkArea::GuiWorkArea(QWidget *)
: buffer_view_(0), lyx_view_(0), : buffer_view_(0), lyx_view_(0),
cursor_visible_(false), cursor_visible_(false),
need_resize_(false), schedule_redraw_(false), need_resize_(false), schedule_redraw_(false),
preedit_lines_(1), completer_(new GuiCompleter(this)), preedit_lines_(1), completer_(new GuiCompleter(this, this)),
context_target_pos_() context_target_pos_()
{ {
} }
@ -249,7 +249,7 @@ GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv)
: buffer_view_(0), lyx_view_(0), : buffer_view_(0), lyx_view_(0),
cursor_visible_(false), cursor_visible_(false),
need_resize_(false), schedule_redraw_(false), need_resize_(false), schedule_redraw_(false),
preedit_lines_(1), completer_(new GuiCompleter(this)), preedit_lines_(1), completer_(new GuiCompleter(this, this)),
context_target_pos_() context_target_pos_()
{ {
setGuiView(gv); setGuiView(gv);