Commit Graph

2518 Commits

Author SHA1 Message Date
Igor Kushnir
70287994dd Remove duplicate resource image alias 2021-03-09 21:32:23 +01:00
Felix Kauselmann
81b4d25b5c Remove unneeded QtOpenGL dependency
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.
2021-03-09 18:26:01 +01:00
Felix Kauselmann
92be3addda Sync and update translation files
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.
2021-03-09 18:22:52 +01:00
Felix Kauselmann
fffd88b5a7 Correct country code for italian translation 2021-03-09 18:22:52 +01:00
Felix Kauselmann
a315021a22 Update qmake files 2021-03-09 18:22:52 +01:00
Felix Kauselmann
7a88baa9f1 Add simplified chinese translation 2021-03-09 18:22:52 +01:00
Felix Kauselmann
42f63201cb Add italian translation 2021-03-09 18:22:52 +01:00
Luis Ángel San Martín
890f9846b3 Support HTML content in the synopsis within the current comic banner 2021-03-07 08:55:51 +01:00
Felix Kauselmann
b67ddcf8e6 Azure: Update Ubuntu VM to 18.04
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)
2021-03-06 23:31:28 +01:00
Luis Ángel San Martín
49ad387908
Merge pull request #228 from YACReader/feature/make_comic_vine_dialog_more_keyboard_friendly
Feature: make comic vine dialog more keyboard friendly
2021-03-06 22:33:02 +01:00
Luis Ángel San Martín
f4112e1190 Update what's new + CHANGELOG 2021-03-06 21:24:53 +01:00
Igor Kushnir
3fcf31d936 Enable/disable comics actions after updating search results
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.
2021-03-06 21:01:20 +01:00
Igor Kushnir
c4333915c9 Library: don't leak DB model objects at exit
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.
2021-03-06 21:00:31 +01:00
Igor Kushnir
5fd5ff5b64 DB model classes: use explicit, nullptr, override 2021-03-06 21:00:31 +01:00
Luis Ángel San Martín
c5de729635 Set the default button based on the current context 2021-03-06 18:07:29 +01:00
Luis Ángel San Martín
5303e247b7 Always use toggleSkipButton 2021-03-06 18:06:05 +01:00
Luis Ángel San Martín
f98ce43465 Add a shortcut to going back 2021-03-06 18:03:04 +01:00
Luis Ángel San Martín
5459ff78cf Disable close button as the default when pressing enter
It can be triggered using ESC
2021-03-06 18:02:41 +01:00
Luis Ángel San Martín
b5251f9416
Merge pull request #224 from YACReader/feature/comic_vine_html_support
feature: Embrace HTML coming from Comic Vine
2021-03-06 09:53:02 +01:00
Luis Ángel San Martín
4c8259e835 Update what's new + CHANGELOG 2021-03-06 09:05:35 +01:00
Luis Ángel San Martín
0f6b203d34 Embrace HTML coming from Comic Vine 2021-03-06 09:05:35 +01:00
Felix Kauselmann
e5526de0af
Render: Protect against race condition in setNumPages (#220)
* Render: Use sendPostedEvents to force processing of queued events when removing old comic objects
2021-03-04 16:45:52 +01:00
Felix Kauselmann
64f7e63a2a Azure: Use qt@5 brew package to install Qt5 on macOS 2021-03-04 15:55:29 +01:00
Luis Ángel San Martín
81f9b74fa2
Merge pull request #222 from YACReader/feature/drop_qtscript
fix: Replace QtScript with QJson*
2021-02-27 13:58:56 +01:00
Luis Ángel San Martín
1a527c51f9 Do not try to pack QtScript in windows installer 2021-02-27 13:09:04 +01:00
Luis Ángel San Martín
6a447c2e5d Stop installing qtscript in azure pipelines 2021-02-27 12:10:25 +01:00
Luis Ángel San Martín
51a9c72d05 Replace QtScript with QJson*
QtScript is deprecated and this was needed to start supporting Qt6
2021-02-27 12:02:57 +01:00
Igor Kushnir
32e1db7134 Disable standard assert() macro in Release builds 2021-02-18 19:49:43 +01:00
Igor Kushnir
6f182b2bb3 Extract CONFIG += c++11 into common config.pri 2021-02-18 19:49:43 +01:00
Felix Kauselmann
cb822c4f47 Add CONFIG += silent to build to reduce log pollution
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.
2021-02-18 19:49:16 +01:00
Igor Kushnir
0f372a001e Library: update toolbar title on history navigation
When Back or Forward action was triggered, the toolbar title was not
updated to match the reselected entry.

I am calling LibraryWindow::setToolbarTitle() from
selectedIndexFromHistory() rather than loadIndexFromHistory(), because
the latter is also called from
YACReaderNavigationController::loadPreviousStatus(), which in turn is
called only from LibraryWindow::setSearchFilter() when the search line
text becomes empty. The toolbar title is already correct and does not
have to be updated in this case.

My code analysis and experiments have revealed that YACReader code never
creates YACReaderLibrarySourceContainer objects of type None. This type
could be removed altogether along with YACReaderLibrarySourceContainer's
default constructor, but for Q_DECLARE_METATYPE macro's requirement. So
YACReaderNavigationController::loadIndexFromHistory() now simply prints
an error message instead of introducing a failure condition by returning
false when the type is None.
2021-02-14 19:07:37 +02:00
Luis Ángel San Martín
93596a4972 Restore needed lock 2021-02-08 09:02:19 +01:00
Luis Ángel San Martín
b55c442590 Add missing import
It fixes compilation with some compilers
2021-02-08 08:38:15 +01:00
Luis Ángel San Martín
4c93c70de6 Use the right mutex when the queue is modified 2021-02-08 08:32:42 +01:00
Igor Kushnir
aa9dd95d5d LibraryWindow: remove a duplicate signal-slot connection
QSqlDatabase::commit() in ComicModel::finishTransaction() returned false
(failed) when this slot was invoked the second time in a row.
2021-02-07 20:16:20 +02:00
Igor Kushnir
5257dc88d6 Library: destroy the temporary thread when deleting finishes
finished() signal of both FoldersRemover and ComicsRemover was not
connected to their QThread's quit() slot. So the thread kept running
after the deletion completed. The QThread's parent is LibraryWindow.
Thus LibraryWindow's ~QObject() invokes the QThread's destructor.

As a result, when the user exited YACReader Library after deleting at
least one folder or comic, it printed the following FATAL message and
crashed at exit: "QThread: Destroyed while thread is still running".

Extract signal-slot connections between a remover and a QThread into
moveAndConnectRemoverToThread() to reduce code duplication.

Remove always true (thread != NULL) checks.
2021-02-07 19:46:15 +02:00
Igor Kushnir
5656c3f540 Make ComicQueryResultProcessor::modelData() static
The function doesn't use data members or other member functions. It
could even be put into an unnamed namespace in the cpp file, but that
would require more changes and complicate turning it back into a member
function if need be in the future.
2021-02-06 20:08:47 +02:00
Igor Kushnir
12c2ff027a ComicQueryResultProcessor: fix a typo in the class name 2021-02-06 20:08:44 +02:00
Igor Kushnir
3a9bec55f8 Library: don't print errors when search edit's text changes
This was a temporary debug output. Not useful anymore.
2021-02-05 09:34:13 +01:00
Luis Ángel San Martín
2e90e38259
Merge pull request #193 from vedgy/dont-leak-folder-processor
Library: don't leak folderQueryResultProcessor at exit
2021-02-04 21:26:11 +01:00
Luis Ángel San Martín
6d5f3d7de3 Use the query search queue in FolderQueryResultProcessor 2021-02-04 19:15:58 +01:00
Igor Kushnir
64d0e22fb5 Library: don't leak folderQueryResultProcessor at exit
FolderQueryResultProcessor has a ConcurrentQueue data member. The leak
meant that the thread was not joined before exit.
2021-02-04 17:58:33 +02:00
Luis Ángel San Martín
117b02fc7f
Merge pull request #192 from vedgy/fix-info-comics-view-crashes
Library: fix InfoComicsView crashes
2021-02-01 18:38:50 +01:00
Igor Kushnir
f88af80379 Library: fix InfoComicsView crashes
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.
2021-02-01 11:27:18 +02:00
Luis Ángel San Martín
350234b099
Merge pull request #187 from YACReader/feature/fix-server-start-up-sequence
Fix launch sequence to avoid http port collisions
2021-01-28 21:04:49 +01:00
Luis Ángel San Martín
f4b2b3d8e3 Update comments 2021-01-28 19:56:35 +01:00
Luis Ángel San Martín
64478ca63f Typo 2021-01-28 19:54:10 +01:00
Luis Ángel San Martín
d96d01d963 Fix launch sequence to avoid http port collisions 2021-01-25 15:48:15 +01:00
Luis Ángel San Martín
f183fc1dd2 Fallback to a text close button if we can't load the svg image
If the svg plugin is missing the user can't see where the close button is
2021-01-22 16:35:58 +01:00
Luis Ángel San Martín
3a6fb91327 Install libqt5svg5-dev package in linux 2021-01-22 11:22:05 +01:00