Introduce actions hash table
The purpose of this patch is to make actions handling in KMyMoney
easier.
Advantages:
- Action names are defined in one place, so no multiple and unconnected
definitions of the same action name.
- Action names are now QStringLiterals, so no allocation of QStrings
occurs.
- Use of KStandardAction::name to get standard action names instead of
hardcoded strings subject to change.
- Use of actionCollection()->action(QString) instead of action(char *)
because the second makes internal QString allocation anyway.
- No use of KToggleAction because everything can be done with QAction.
- QKeySequence uses Qt::CTRL + Qt::Key_F rather than "Ctrl+F", so less
processing power and memory is used.
- No multiple QAction pointers in KMyMoneyApp::initActions.
- Actions are connected using new signal-slot syntax, so errors are
easy to spot.
- Actions are initialized through one loop from struct, so every action
is initialized the same way and with little error probability.
- Through initialization lists it's easier to see what action has got
what icon, signal, text, and shortcut.
- Easier to change icon theme on the fly.
Differential Revision: https://phabricator.kde.org/D6378
Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>