mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Avoid errorList copy.
* ControlErrorList: - error_list_: deleted - error_type_: new private member. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16849 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a1da61470
commit
2a890b4b96
@ -45,18 +45,18 @@ void ControlErrorList::clearParams()
|
||||
|
||||
ErrorList const & ControlErrorList::errorList() const
|
||||
{
|
||||
return errorlist_;
|
||||
return kernel().bufferview()->buffer()->errorList(error_type_);
|
||||
}
|
||||
|
||||
|
||||
bool ControlErrorList::initialiseParams(string const & error_type)
|
||||
{
|
||||
error_type_ = error_type;
|
||||
Buffer * buf = kernel().bufferview()->buffer();
|
||||
// FIXME UNICODE
|
||||
docstring const title = bformat(_("%1$s Errors (%2$s)"),
|
||||
_(error_type),
|
||||
lyx::from_utf8(buf->fileName()));
|
||||
errorlist_ = buf->errorList(error_type);
|
||||
name_ = lyx::to_utf8(title);
|
||||
return true;
|
||||
}
|
||||
@ -70,7 +70,7 @@ string const & ControlErrorList::name()
|
||||
|
||||
void ControlErrorList::goTo(int item)
|
||||
{
|
||||
ErrorItem const & err = errorlist_[item];
|
||||
ErrorItem const & err = errorList()[item];
|
||||
|
||||
if (err.par_id == -1)
|
||||
return;
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
ErrorList const & errorList() const;
|
||||
private:
|
||||
///
|
||||
ErrorList errorlist_;
|
||||
std::string error_type_;
|
||||
///
|
||||
std::string name_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user