]> git.lyx.org Git - features.git/commitdiff
Still trying to solve the Toc panel crash with stdlib-debug enabled gcc.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 3 Apr 2007 13:07:38 +0000 (13:07 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 3 Apr 2007 13:07:38 +0000 (13:07 +0000)
* ControlToc::update(): get rid of the pure virutal method.
* QToc::initialiseParams(): overload ControlToc method.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17708 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ControlToc.C
src/frontends/controllers/ControlToc.h
src/frontends/qt4/QToc.C
src/frontends/qt4/QToc.h

index d16bd5ecb0fa797b6dd5a9f09888725cba94096f..e5f084d620f7844addaa136b7ebfcfc11d4c0763 100644 (file)
@@ -77,7 +77,6 @@ bool ControlToc::initialiseParams(string const & data)
                }
        }
 
-       update();
        return true;
 }
 
index 987df9707d80002b82972701b4d62dfde7a60625..640e9a5815205b57a1e8e7bea361d74fe8bf3a58 100644 (file)
@@ -32,7 +32,7 @@ public:
        virtual ~ControlToc() {}
 
        /// \c ControlCommand inherited method.
-       bool initialiseParams(std::string const & data);
+       virtual bool initialiseParams(std::string const & data);
 
        ///
        TocList const & tocs() const;
@@ -63,10 +63,6 @@ public:
        ///
        void updateBackend();
 
-public:
-       /// Update the model data if needed.
-       virtual void update() = 0;
-
 private:
        /// Return the guiname from a given cmdName of the TOC param
        docstring const getGuiName(std::string const & type) const;
index de1c48d76ba13012b586bf5f57620f9f95765e9d..6888f01e29806bdf47f8fb81c50c972e552f7cef 100644 (file)
@@ -107,6 +107,15 @@ void QToc::goTo(int type, QModelIndex const & index)
 }
 
 
+bool QToc::initialiseParams(std::string const & data)
+{
+       if (!ControlToc::initialiseParams(data))
+               return false;
+       update();
+       return true;
+}
+
+
 void QToc::update()
 {
        updateType();
index f7875b90032af96648054df82c5b7fe511eb7f6b..5580e950019b997a6357c4499b1d00c95c76cdcf 100644 (file)
@@ -32,7 +32,11 @@ class QToc : public QObject, public ControlToc
 public:
 
        QToc(Dialog &);
+       virtual ~QToc() {}
 
+       /// \c ControlToc inherited method.
+       virtual bool initialiseParams(std::string const & data);
+       ///
        void update();
        ///
        void updateToc();