Still trying to solve the Toc panel crash with stdlib-debug enabled gcc.

* 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
This commit is contained in:
Abdelrazak Younes 2007-04-03 13:07:38 +00:00
parent e37e918e38
commit 9aed8cf115
4 changed files with 14 additions and 6 deletions

View File

@ -77,7 +77,6 @@ bool ControlToc::initialiseParams(string const & data)
}
}
update();
return true;
}

View 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;

View 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();

View 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();