mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Fix memory leaks with multiple windows and crash when deleteOnClose is set.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16157 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a96321573
commit
7df55755ac
@ -157,9 +157,7 @@ GuiView::GuiView(int id)
|
|||||||
{
|
{
|
||||||
// Qt bug? signal lastWindowClosed does not work
|
// Qt bug? signal lastWindowClosed does not work
|
||||||
setAttribute(Qt::WA_QuitOnClose, false);
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
// FIXME: the following statement avoids memory leaks but produces a
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
// crash after a new window has been closed (click into the menu)
|
|
||||||
//setAttribute(Qt::WA_DeleteOnClose, true);
|
|
||||||
|
|
||||||
// hardcode here the platform specific icon size
|
// hardcode here the platform specific icon size
|
||||||
d.smallIconSize = 14; // scaling problems
|
d.smallIconSize = 14; // scaling problems
|
||||||
@ -180,6 +178,7 @@ GuiView::GuiView(int id)
|
|||||||
|
|
||||||
GuiView::~GuiView()
|
GuiView::~GuiView()
|
||||||
{
|
{
|
||||||
|
menubar_.reset();
|
||||||
delete &d;
|
delete &d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,9 @@ void QLPopupMenu::update()
|
|||||||
if (name_.empty())
|
if (name_.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Here, We make sure that theLyXFunc points to the correct LyXView.
|
||||||
|
theLyXFunc().setLyXView(owner_->view());
|
||||||
|
|
||||||
Menu const & fromLyxMenu = owner_->backend().getMenu(name_);
|
Menu const & fromLyxMenu = owner_->backend().getMenu(name_);
|
||||||
owner_->backend().expand(fromLyxMenu, topLevelMenu_, owner_->view()->buffer());
|
owner_->backend().expand(fromLyxMenu, topLevelMenu_, owner_->view()->buffer());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user