mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Modify r38980 in response to Vincent's comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39021 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e607cbfbca
commit
5c264ebdf3
@ -3154,18 +3154,7 @@ void Buffer::getSourceCode(odocstream & os, string const format,
|
||||
}
|
||||
|
||||
|
||||
ErrorList const & Buffer::errorList(string const & type) const
|
||||
{
|
||||
static const ErrorList emptyErrorList;
|
||||
map<string, ErrorList>::iterator it = d->errorLists.find(type);
|
||||
if (it == d->errorLists.end())
|
||||
return emptyErrorList;
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
ErrorList & Buffer::errorList(string const & type)
|
||||
ErrorList & Buffer::errorList(string const & type) const
|
||||
{
|
||||
return d->errorLists[type];
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ public:
|
||||
/// errors (like parsing or LateX compilation). This method is const
|
||||
/// because modifying the returned ErrorList does not touch the document
|
||||
/// contents.
|
||||
ErrorList & errorList(std::string const & type);
|
||||
ErrorList const & errorList(std::string const & type) const;
|
||||
ErrorList & errorList(std::string const & type) const;
|
||||
|
||||
/// The Toc backend.
|
||||
/// This is useful only for screen visualisation of the Buffer. This
|
||||
|
@ -1451,7 +1451,7 @@ void GuiView::errors(string const & error_type, bool from_master)
|
||||
#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
|
||||
// We are called with from_master == false by default, so we
|
||||
// have to figure out whether that is the case or not.
|
||||
ErrorList & el = const_cast<ErrorList &>(bv->buffer().errorList(error_type));
|
||||
ErrorList & el = bv->buffer().errorList(error_type);
|
||||
if (el.empty()) {
|
||||
el = bv->buffer().masterBuffer()->errorList(error_type);
|
||||
from_master = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user