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.
Qmake by default creates lots of unnecessary information during builds
which makes it hard to extract warnings and errors from the log.
Add the undocumented silent parameter to make it less talky.
InfoComicsView constructor is the only function that connects to
FlowView's currentCoverChanged signal. Neither of the slots connected to
this signal handles the argument value index==-1. So when FlowView emits
this signal with index==-1, YACReaderLibrary crashes. Returning early
from either ComicsView::updateInfoForIndex() or
InfoComicsView::setCurrentIndex() when index==-1 is not sufficient - the
crash happens in the other slot then. Let us skip emitting the signal in
FlowView if index==-1 rather than return early from both slots.
Steps to reproduce 1:
1. Launch YACReaderLibrary version that matches the version of the
default library database. Alternatively, select a compatible library
after starting the application.
2. If InfoComicsView is not active, switch to it.
3. (optional) Switch to another comics view out of InfoComicsView.
4. Quit YACReaderLibrary. The application crashes during exit - after
the "YACReaderLibrary closed with exit code : 0" message is printed.
Steps to reproduce 2:
1. Launch a YACReaderLibrary version newer than the version of the
default library database.
2. Click the "No" button in the "Update needed" dialog that pops up.
3. Change between comics views until InfoComicsView becomes active. If
this view was active at the beginning, switch through all the views to
get back to it. At this point YACReaderLibrary crashes.