mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +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
|
ErrorList const & ControlErrorList::errorList() const
|
||||||
{
|
{
|
||||||
return errorlist_;
|
return kernel().bufferview()->buffer()->errorList(error_type_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ControlErrorList::initialiseParams(string const & error_type)
|
bool ControlErrorList::initialiseParams(string const & error_type)
|
||||||
{
|
{
|
||||||
|
error_type_ = error_type;
|
||||||
Buffer * buf = kernel().bufferview()->buffer();
|
Buffer * buf = kernel().bufferview()->buffer();
|
||||||
// FIXME UNICODE
|
// FIXME UNICODE
|
||||||
docstring const title = bformat(_("%1$s Errors (%2$s)"),
|
docstring const title = bformat(_("%1$s Errors (%2$s)"),
|
||||||
_(error_type),
|
_(error_type),
|
||||||
lyx::from_utf8(buf->fileName()));
|
lyx::from_utf8(buf->fileName()));
|
||||||
errorlist_ = buf->errorList(error_type);
|
|
||||||
name_ = lyx::to_utf8(title);
|
name_ = lyx::to_utf8(title);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ string const & ControlErrorList::name()
|
|||||||
|
|
||||||
void ControlErrorList::goTo(int item)
|
void ControlErrorList::goTo(int item)
|
||||||
{
|
{
|
||||||
ErrorItem const & err = errorlist_[item];
|
ErrorItem const & err = errorList()[item];
|
||||||
|
|
||||||
if (err.par_id == -1)
|
if (err.par_id == -1)
|
||||||
return;
|
return;
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
ErrorList const & errorList() const;
|
ErrorList const & errorList() const;
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
ErrorList errorlist_;
|
std::string error_type_;
|
||||||
///
|
///
|
||||||
std::string name_;
|
std::string name_;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user