Where possible, move shortcuts from being defined in MainWindow.cpp to being defined in MainWindow.ui. Previously, there was a seemingly random mix of both practices.
The only shortcuts defined in the .cpp file are now ones that can't be defined in the .ui file, because they are in some way conditional.
This also reduces the number of compiler warnings of the kind
warning: arithmetic between different enumeration types ‘Qt::Modifier’ and ‘Qt::Key’ is deprecated [-Wdeprecated-enum-enum-conversion]
with recent GCC versions.
And some minor code cleanups in MainWindow.cpp.
Also, change the shortcut for the Clone Entry shortcut from Ctrl+K to Ctrl+D (see discussion below).
Testing strategy
Type of change
✅ Refactor (significant modification to existing code)
Where possible, move shortcuts from being defined in
MainWindow.cpp
to being defined inMainWindow.ui
. Previously, there was a seemingly random mix of both practices.The only shortcuts defined in the
.cpp
file are now ones that can't be defined in the.ui
file, because they are in some way conditional.This also reduces the number of compiler warnings of the kind
with recent GCC versions.
And some minor code cleanups in
MainWindow.cpp
.Also, change the shortcut for the Clone Entry shortcut from Ctrl+K to Ctrl+D (see discussion below).
Testing strategy
Type of change