Commit Graph

2639 Commits

Author SHA1 Message Date
Felix Kauselmann
2e0785e3a5 Azure: Update Windows builds to use VS 2019 and Qt 5.15.2
Qt 5.15.2 and VS 2019 support all Windows platforms still supported
by YACReader. Update the build to take advantage of it.
2021-03-14 14:56:17 +01:00
Luis Ángel San Martín
84c43e456e
Merge pull request #209 from vedgy/add-focus-shortcuts
Add focus shortcuts
2021-03-13 17:09:46 +01:00
Luis Ángel San Martín
efd9f478ca Make underlying NSTextField the first responder on setFocus 2021-03-13 16:32:27 +01:00
Luis Ángel San Martín
06814d066a
Merge pull request #200 from vedgy/rename-processor-class-typo
Fix a typo in ComicQueryResultProcessor class name
2021-03-13 15:54:22 +01:00
Igor Kushnir
288b9cbec6 ComicsView's derived classes: use explicit, nullptr, override 2021-03-13 15:33:38 +02:00
Igor Kushnir
fc57378a85 Remove unused sizeHint() from GridComicsView and ComicsViewTransition
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().
2021-03-13 15:33:34 +02:00
Igor Kushnir
8a54100804 Library: allow configuring a shortcut to focus comics view
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).
2021-03-13 15:08:33 +02:00
Igor Kushnir
81e40dabec Library: add a shortcut to focus search line
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.
2021-03-13 14:59:29 +02:00
Luis Ángel San Martín
6ab5a83e01
Merge pull request #231 from vedgy/remove-unused-variable
PageController*::service: remove unused libraryName variable
2021-03-13 12:16:05 +01:00
Felix Kauselmann
18506c21cc Treeview: Remove QSysInfo
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.
2021-03-13 10:46:43 +01:00
Felix Kauselmann
97377cdcf4 Eliminate qsort, use std::sort 2021-03-13 10:46:43 +01:00
Felix Kauselmann
75c2618eff Qmake: Introduce Qt deprecation macros
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.
2021-03-13 10:46:43 +01:00
Felix Kauselmann
14d9ba9de5 Update qmake version check for Qt 5.9 and Qt 6
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.
2021-03-13 10:46:43 +01:00
Igor Kushnir
f60e17674e Server controllers: remove unused libraryName variable 2021-03-13 10:16:27 +02:00
Luis Ángel San Martín
0925771f05
Merge pull request #235 from vedgy/configurable-fit-to-page-shortcut
Allow to configure Fit to page action shortcut in the UI
2021-03-13 08:33:09 +01:00
Igor Kushnir
497894c5bf Allow to configure Fit to page action shortcut in the UI 2021-03-11 11:14:24 +02:00
Igor Kushnir
21c3bda5d4 YACReaderFlowGL: initialize data member texture pointers
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.
2021-03-09 21:32:23 +01:00
Igor Kushnir
b87be81037 Deprecated QSortFilterProxyModel::clear() => invalidate() 2021-03-09 21:32:23 +01:00
Igor Kushnir
8af4c01a03 Port away from deprecated QFlags(Zero) constructor
This change gets rid of a few GCC's -Wdeprecated-declarations warnings.
2021-03-09 21:32:23 +01:00
Igor Kushnir
4dcbb958dc Eliminate QStringList <=> QList<QString> conversions
The conversions prevented return value optimization and caused a
-Wreturn-std-move Clang warning.
2021-03-09 21:32:23 +01:00
Igor Kushnir
3c9ed6ef8f Deprecated qSort => std::sort
This change gets rid of some GCC's -Wdeprecated-declarations warnings.
2021-03-09 21:32:23 +01:00
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