We had this typedef in several places. That is messy. This patch moves the typedef to LyXKeySym.h, we loose some forward declarations, but that cannot be helped.
Index: src/BufferView_pimpl.h =================================================================== --- src/BufferView_pimpl.h (revision 13662) +++ src/BufferView_pimpl.h (working copy) @@ -76,8 +76,6 @@ /// Wheel mouse scroll, move by multiples of text->defaultRowHeight(). void scroll(int lines); /// - typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; - /// void workAreaKeyPress(LyXKeySymPtr key, key_modifier::state state); /// void selectionRequested(); Index: src/frontends/WorkArea.h =================================================================== --- src/frontends/WorkArea.h (revision 13662) +++ src/frontends/WorkArea.h (working copy) @@ -14,14 +14,13 @@ #define WORKAREA_H #include "frontends/key_state.h" +#include "frontends/LyXKeySym.h" -#include <boost/shared_ptr.hpp> #include <boost/signal.hpp> class Painter; class FuncRequest; -class LyXKeySym; /** * The work area class represents the widget that provides the @@ -32,8 +31,6 @@ */ class WorkArea { public: - typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; - WorkArea() {} virtual ~WorkArea() {} Index: src/frontends/LyXKeySym.h =================================================================== --- src/frontends/LyXKeySym.h (revision 13662) +++ src/frontends/LyXKeySym.h (working copy) @@ -16,6 +16,8 @@ #include "key_state.h" +#include <boost/shared_ptr.hpp> + /** * This is a base class for representing a keypress. * Each frontend has to implement this to provide @@ -64,4 +66,6 @@ */ bool operator==(LyXKeySym const & k1, LyXKeySym const & k2); +typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; + #endif Index: src/lyxfunc.h =================================================================== --- src/lyxfunc.h (revision 13662) +++ src/lyxfunc.h (working copy) @@ -48,8 +48,6 @@ std::string const viewStatusMessage(); /// - typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; - /// void processKeySym(LyXKeySymPtr key, key_modifier::state state); /// Index: src/kbsequence.h =================================================================== --- src/kbsequence.h (revision 13662) +++ src/kbsequence.h (working copy) @@ -14,20 +14,17 @@ #define KBSEQUENCE_H #include "frontends/key_state.h" - -#include <boost/shared_ptr.hpp> +#include "frontends/LyXKeySym.h" #include <string> #include <vector> class kb_keymap; -class LyXKeySym; class FuncRequest; /// Holds a key sequence and the current and standard keymaps class kb_sequence { public: - typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; typedef std::vector<LyXKeySymPtr> KeySequence; friend class kb_keymap; Index: src/kbmap.h =================================================================== --- src/kbmap.h (revision 13662) +++ src/kbmap.h (working copy) @@ -17,6 +17,7 @@ #include "funcrequest.h" #include "frontends/key_state.h" +#include "frontends/LyXKeySym.h" #include <boost/shared_ptr.hpp> @@ -24,7 +25,6 @@ #include <deque> class kb_sequence; -class LyXKeySym; /// Defines key maps and actions for key sequences class kb_keymap { @@ -43,8 +43,6 @@ /// print all available keysyms std::string const print() const; - /// - typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; /** * Look up a key press in the keymap. * @param key the keysym
-- Lgb