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.
QSysInfo::MacVersion is deprecated in Qt 5.9 and the code it was used in
is effectively dead code as it is specific to macOS versions no longer supported
by Qt 5.9.
Remove it.
As the minimum build requirements are now Qt 5.9, enable the QT_DEPRECATED_SINCE
macro and set the deprecation target to 5.9 and earlier. This will make our build
fail if functions deprecated in Qt 5.9 or earlier are used.
Also, enable the QT_DEPRECATED_WARNINGS macro so our build system warns us when
we are using functions deprecated in newer versions of Qt so we can port away from
those too.
The old way to check for the Qt version was a bit of a hack
and not very flexible. For Qt 6, it was broken and produced
false positives.
This commit fixes this by replacing the check function with
a proper implementation imported from QtCreator's qmake files
and updates the minimum requirements to reflect the new situation.
Moving the initialization of defaultTexture out of the member
initializer list gets rid of a GCC's -Wreorder warning.
Initialize other texture pointers to improve safety and consistency.
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.
Update Ubuntu VM to 18.04 and remove external kubuntu backports PPA
previously used to get Qt packages.
While we're at it, remove libglu1-mesa-dev package too. The external
repo for libunarr is still needed as Ubuntu 18.04 does not package
it yet (it is included in 20.04)
Before this commit starting a search when an empty folder or an empty
reading list was selected left all comics actions disabled. Fixes#213.
When search mode is exited, we always call either
YACReaderNavigationController::loadFolderInfo() or
YACReaderNavigationController::loadListInfo(). Both of them call
LibraryWindow::disableComicsActions(), so the enabled/disabled state of
the comics actions stays up-to-date at all times.
Currently these objects are created once at program startup and are
never destroyed. Printing debug messages in the models' destructors
confirms the leaks and proves that with this fix the objects are
destroyed at Library exit.