]> git.lyx.org Git - features.git/commitdiff
Remove a redundant deletion of a QObject
authorGuillaume Munch <gm@lyx.org>
Sat, 31 Dec 2016 14:16:15 +0000 (15:16 +0100)
committerGuillaume Munch <gm@lyx.org>
Sat, 31 Dec 2016 14:16:15 +0000 (15:16 +0100)
src/frontends/qt4/GuiToc.cpp
src/frontends/qt4/GuiToc.h

index 29ec85c27ff9db904df6e0a4104ae91c75702584..e124a468b428c48cf161d2341fa84c5633d973f2 100644 (file)
@@ -33,20 +33,15 @@ namespace lyx {
 namespace frontend {
 
 GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
-       : DockView(parent, "toc", qt_("Outline"), area, flags), is_closing_(false)
+       : DockView(parent, "toc", qt_("Outline"), area, flags),
+         widget_(new TocWidget(parent, this)),
+         is_closing_(false)
 {
-       widget_ = new TocWidget(parent, this);
        setWidget(widget_);
        setFocusProxy(widget_);
 }
 
 
-GuiToc::~GuiToc()
-{
-       delete widget_;
-}
-
-
 void GuiToc::updateView()
 {
        widget_->updateView();
index 6c7db9dae7aadc07ddcb6891cbd0898afc29388a..d403bc94f9b38a0d58541c494d71eb3295b4c05f 100644 (file)
@@ -34,8 +34,6 @@ public:
                Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
                Qt::WindowFlags flags = 0);
 
-       ~GuiToc();
-
        ///
        bool initialiseParams(std::string const & data);
        void updateView();