Skip to content
Commit 282e79c1 authored by Nate Graham's avatar Nate Graham Committed by Vlad Zahorodnii
Browse files

useraction: port away from DEF macros

Currently, defining shortcuts in useractions.cpp is done using one of
six macros, some of which allow the name that ends up as the key in
the config file to be autogenerated from an untranslated form of the
user-facing text.

Whenever a shortcut using one of these macros is renamed, the key in the
config file changes too, so users lose any custom shortcuts they had
assigned.

To avoid this, developers need to know that they have to switch to the
relevant macro that allows the name and description to be defined
separately, remember to do so, and manually set a name that matches the
old user-facing text. This can be forgotten, is not obvious to new
developers, and is a subtle source of user-facing bugs.

In addition the macros are largely unnecessary, as they are wrappers 
around a custom function. We can just call the custom function 
ourselves.

This commit ports away from the macros and calls the initShortcut()
instead, which resolves both issues.

cc @davidre
parent 9e8b3704
Pipeline #207771 passed with stage
in 33 minutes and 41 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment