mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
add GuiView parent to QToc for proper memory management.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17753 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f139b65352
commit
978c87fae7
@ -304,9 +304,9 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
||||
#endif
|
||||
} else if (name == "toc") {
|
||||
QToc * qtoc = new QToc(*dialog);
|
||||
dialog->setController(qtoc);
|
||||
GuiView & gui_view = static_cast<GuiView &>(lyxview_);
|
||||
QToc * qtoc = new QToc(*dialog, &gui_view);
|
||||
dialog->setController(qtoc);
|
||||
dialog->setView(new DockView<QToc, TocWidget>(
|
||||
*dialog, qtoc, &gui_view, _("Toc")));
|
||||
dialog->bc().bp(new OkCancelPolicy);
|
||||
|
@ -33,8 +33,8 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
QToc::QToc(Dialog & parent)
|
||||
: ControlToc(parent)
|
||||
QToc::QToc(Dialog & dialog, QObject * parent)
|
||||
: QObject(parent), ControlToc(dialog)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class QToc : public QObject, public ControlToc
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
QToc(Dialog &);
|
||||
QToc(Dialog &, QObject * parent = 0);
|
||||
virtual ~QToc() {}
|
||||
|
||||
/// \c ControlToc inherited method.
|
||||
|
Loading…
Reference in New Issue
Block a user