From 31e5a1569546b7190078e3d8c8657907ce7fd846 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 23 Sep 2008 13:18:51 +0000 Subject: [PATCH] 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 --- src/LyXAction.cpp | 6 ++++++ src/LyXAction.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 26cf09a280..a33ffdb6b9 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -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 diff --git a/src/LyXAction.h b/src/LyXAction.h index 70381a0022..6f952d54e9 100644 --- a/src/LyXAction.h +++ b/src/LyXAction.h @@ -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; -- 2.39.2