When a key not handled by Grid view is pressed while it has focus, the
following warning appears in Library's output
qrc:/qml/GridComicsView.qml:776: Error: Cannot assign [undefined] to int
AND the top-left cover is selected. The added early return fixes both
issues.
The Ctrl+Q shortcut is assigned to Quit action in most applications on
GNU/Linux. Command+Q is used on macOS. The added shortcut should be
automatically mapped to Command+Q on macOS judging by the following
quote from QKeySequence class documentation:
Note: On macOS, references to "Ctrl", Qt::CTRL, Qt::Key_Control and
Qt::ControlModifier correspond to the Command keys on the Macintosh
keyboard
QKeySequence::Quit could be used as the default key sequence in place of
`Qt::CTRL | Qt::Key_Q`. This would leave the shortcut unassigned by
default on Windows. But YACReader doesn't use QKeySequence::StandardKey
anywhere, so perhaps this shortcut should be hard-coded too.
The shortcut is particularly useful when Close to tray option is
enabled, because in this case closing the Library window with a system
window manager shortcut simply hides it.
QWidget::sizeHint() is const-qualified, so Clang warns that non-const
sizeHint() member functions merely hide the virtual function of the base
class.
664dac3401 and
9f53ae6efc introduced these member
functions in 2014 without const qualifiers. QWidget::sizeHint() was
const-qualified even in Qt 3. Since these member functions have never
had any effect, they should be removed rather than const-qualified to
preserve the long-standing behaviors of the two classes.
Add a TODO for a similar but less straightforward issue with
PropertiesDialog::sizeHint().
Focusing the current comics view allows to use keyboard arrow keys to
choose among the visible comics.
The shortcut for this new action should not be a single character
without modifiers because it won't work when the search line has focus.
The Qt::FocusReason parameter in ComicsView::focusComicsNavigation()
allows to reuse this function for other keyboard navigation features.
For instance the search line can transfer focus to comics navigation
when the user presses Return or Enter key. In this case
Qt::OtherFocusReason can be used (an application-specific reason).
The Ctrl+F shortcut gives focus to a search bar in many applications.
In this case it allows to search the library without touching a mouse.
YACReaderMacOSXSearchLineEdit::setFocus() will have to be implemented to
make the shortcut work on macOS.
Qt OpenGL in Qt5 is a deprecated module that is discouraged for
new code usage. We have been including this module in our builds
despite not relying on its functionality for a long time now -
probably an oversight from porting to the newer functions.
Time to remove it.
IMPORTANT INFORMATION: In Qt6, a lot of functionality that was
provided by Qt GUI was moved into the 'new' Qt6 Qt OpenGL module.
Thus, even if it makes perfectly sense to remove it for Qt5 builds
we will likely have to restore it for Qt6 builds at a later time.
In the past, translation files provided by the community
mostly came as pregenerated .qm files missing the corresponding
.ts sources. This has led to a situation where the translations
are out of sync with the sources and the sources have not been
updated for several release iterations.
To improve the situation, this commit syncs all .qm files back to
the sources by using the lconvert tool to create .ts files and
updating these files against our sources using lupdate.
For future updates, a CI solution would be preferable.