]> git.lyx.org Git - features.git/commit
Action.cpp: replace a reference with a shared_ptr
authorGuillaume Munch <gm@lyx.org>
Wed, 3 Aug 2016 21:06:20 +0000 (22:06 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 28 Aug 2016 21:49:21 +0000 (22:49 +0100)
commit4d99112056410762c720e8dfe2c859ff84c4a8b3
tree1449e8af58cef7b9ff3d08e4f1b3bdcc9eeb8d9a
parent0779b3c36cb693bdb85aea7a155f4384b49c4902
Action.cpp: replace a reference with a shared_ptr

Replace the member reference to FuncRequest in Action.cpp with a
shared_ptr. Compared to copying the FuncRequest, the shared_ptr has two
advantages:

* Recreating the menu each time creates a lot of new actions, so we avoid a lot
  of copies.

* FuncRequest can remain forward-declared in Action.h.
src/frontends/qt4/Action.cpp
src/frontends/qt4/Action.h
src/frontends/qt4/GuiToolbar.cpp
src/frontends/qt4/Menus.cpp
src/frontends/qt4/Toolbars.cpp
src/frontends/qt4/Toolbars.h