Get some good debug output for function codes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26502 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-09-23 13:18:51 +00:00
parent 4a74c5f965
commit 31e5a15695
2 changed files with 9 additions and 0 deletions

View File

@ -3126,5 +3126,11 @@ LyXAction::const_func_iterator LyXAction::func_end() const
return lyx_func_map.end();
}
LyXErr & operator<<(LyXErr & l, FuncCode code)
{
if (l.enabled())
l.stream() << lyxaction.getActionName(code);
return l;
}
} // namespace lyx

View File

@ -22,6 +22,7 @@
namespace lyx {
class FuncRequest;
class LyXErr;
/**
* This class is a container for LyX actions. It associates a name to
@ -117,6 +118,8 @@ private:
info_map lyx_info_map;
};
LyXErr & operator<<(LyXErr &, FuncCode);
/// singleton instance
extern LyXAction lyxaction;