diff --git a/src/BufferView.cpp b/src/BufferView.cpp index dda765ef8f..8130db3bea 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1204,14 +1204,7 @@ void BufferView::editInset(string const & name, Inset * inset) void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) { - //lyxerr << [ cmd = " << cmd << "]" << endl; - - // Make sure that the cached BufferView is correct. - LYXERR(Debug::ACTION, " action[" << cmd.action() << ']' - << " arg[" << to_utf8(cmd.argument()) << ']' - << " x[" << cmd.x() << ']' - << " y[" << cmd.y() << ']' - << " button[" << cmd.button() << ']'); + LYXERR(Debug::ACTION, "BufferView::dispatch: cmd: " << cmd); string const argument = to_utf8(cmd.argument()); Cursor & cur = d->cursor_; diff --git a/src/FuncRequest.cpp b/src/FuncRequest.cpp index 1d98ca1ea0..c912b3a0ae 100644 --- a/src/FuncRequest.cpp +++ b/src/FuncRequest.cpp @@ -13,6 +13,7 @@ #include "FuncRequest.h" #include "LyXAction.h" +#include "support/debug.h" #include "support/lstrings.h" #include @@ -132,12 +133,19 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs) ostream & operator<<(ostream & os, FuncRequest const & cmd) { return os - << " action: " << cmd.action() - << " [" << lyxaction.getActionName(cmd.action()) << "] " + << " action: " << cmd.action() + << " [" << lyxaction.getActionName(cmd.action()) << "] " << " arg: '" << to_utf8(cmd.argument()) << "'" << " x: " << cmd.x() << " y: " << cmd.y(); } +LyXErr & operator<<(LyXErr &l, FuncRequest const &fr) +{ + ostringstream oss; + oss << fr; + return l << oss.str(); +} + } // namespace lyx diff --git a/src/FuncRequest.h b/src/FuncRequest.h index 175eb59fd1..613c443a17 100644 --- a/src/FuncRequest.h +++ b/src/FuncRequest.h @@ -21,6 +21,8 @@ namespace lyx { +class LyXErr; + /** * This class encapsulates a LyX action and its argument * in order to pass it around easily. @@ -108,6 +110,8 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs); std::ostream & operator<<(std::ostream &, FuncRequest const &); +LyXErr & operator<<(LyXErr &, FuncRequest const &); + } // namespace lyx diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 77131a055b..31fb6b5766 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -261,8 +261,7 @@ Inset * InsetText::editXY(Cursor & cur, int x, int y) void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) { - LYXERR(Debug::ACTION, "InsetText::doDispatch()" - << " [ cmd.action() = " << cmd.action() << ']'); + LYXERR(Debug::ACTION, "InsetText::doDispatch(): cmd: " << cmd); if (getLayout().isPassThru()) { // Force any new text to latex_language FIXME: This diff --git a/status.20x b/status.20x index 0ccd50e96f..2d024faecd 100644 --- a/status.20x +++ b/status.20x @@ -291,6 +291,9 @@ What's new - Fixed compilation with clang. +- In debugging messages related to LyX actions, make sure that the + action and its arguments are correctly reported. + - Included the qt gif plugin in the Windows installer. This enables the busy icon in the status bar.