Commit Graph

1052 Commits

Author SHA1 Message Date
ad036ec6ae Include the hashes of the prev/next comics in the comic info when opening a comic in the server 2021-06-18 22:55:08 +02:00
af13279c18 Fix open comic signal 2021-06-11 22:36:33 +02:00
02739ec140 Do not reuse v1 docroot and template paths
They can go stale and break v1 browsing
2021-06-01 19:34:54 +02:00
68e9f06a13 GridComicsView: ignore unhandled key presses
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.
2021-05-28 19:35:05 +02:00
2acfbbfac7 Library: add Quit shortcut
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.
2021-05-28 19:34:24 +02:00
4fc60c72aa Update YACReaderLibrary <-> YACReader communication to support reading lists 2021-05-27 18:56:31 +02:00
945b24a8f8 Extract opening a comic from YACReaderLibrary to its own file
And send a new param `--readingListId` to tell YACReader that the comic is opened from a reading list.
2021-05-27 18:48:52 +02:00
f9285bd099 Add a flag to getReadingListFullContent so it can load all the fields 2021-05-27 18:39:00 +02:00
7bb450408c Extract "query to ComicInfo" to its own method to avoid duplicated code 2021-05-27 18:38:24 +02:00
50840e955d Map the new controller to its path 2021-05-25 21:46:35 +02:00
0333c9f050 Add a new server controller for opening comics from reading lists 2021-05-25 21:45:07 +02:00
6cf11f47e1 Avoid potential null pointer access 2021-05-25 21:41:45 +02:00
6848295ba4 Remove unused imports and forward definitions 2021-05-25 21:40:55 +02:00
e2483217d9 Configure OpenGL settings earlier to avoid wrong state in the options dialog 2021-05-16 09:37:05 +02:00
13d0f5fc75 Do not show the what's new dialog when there are no libraries
No libraries probably means fresh installation.
2021-05-16 09:21:42 +02:00
b1713fc184 Fix crash on null pointer 2021-05-16 09:11:00 +02:00
13a29e2657 Make "delete" icon work properly in the "Reading" list
Only the "Favorites" special list was handled.
2021-05-16 09:01:35 +02:00
e799513fb4 Reset the grid current index when the grid content changes
`model` object doesn't really change so we can't use `onModelChanged` in QML to reset the index.
2021-05-16 08:57:18 +02:00
dbe1da58dc Update Simplified Chinese GUI translation for YACReader &
YACReaderLibrary
2021-05-09 11:55:52 +02:00
c3a99b19a5 Fix library creation on 9.8.0 by adding missing manga field to folder 2021-05-08 15:21:30 +02:00
5f3824ff3c Fix order when getting next/previous remote comics
This sorting matches what the remote browser uses.
2021-04-30 09:53:35 +02:00
b8ad99fcaa Exract struct to reuse it 2021-04-30 09:52:31 +02:00
811c3fcfe4 Add function to get comics from a folder properly sorted 2021-04-30 09:52:10 +02:00
b447226bc1 Avoid indexes out of range when processing v1 updated session data 2021-04-10 09:51:14 +02:00
58a74a0c03 Merge pull request #216 from vedgy/update-toolbar-title-on-history-navigation
Library: update toolbar title on history navigation
2021-03-14 16:28:33 +01:00
84c43e456e Merge pull request #209 from vedgy/add-focus-shortcuts
Add focus shortcuts
2021-03-13 17:09:46 +01:00
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
288b9cbec6 ComicsView's derived classes: use explicit, nullptr, override 2021-03-13 15:33:38 +02:00
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
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
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
6ab5a83e01 Merge pull request #231 from vedgy/remove-unused-variable
PageController*::service: remove unused libraryName variable
2021-03-13 12:16:05 +01:00
97377cdcf4 Eliminate qsort, use std::sort 2021-03-13 10:46:43 +01:00
f60e17674e Server controllers: remove unused libraryName variable 2021-03-13 10:16:27 +02:00
b87be81037 Deprecated QSortFilterProxyModel::clear() => invalidate() 2021-03-09 21:32:23 +01:00
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
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
3c9ed6ef8f Deprecated qSort => std::sort
This change gets rid of some GCC's -Wdeprecated-declarations warnings.
2021-03-09 21:32:23 +01:00
70287994dd Remove duplicate resource image alias 2021-03-09 21:32:23 +01:00
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
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
a315021a22 Update qmake files 2021-03-09 18:22:52 +01:00
890f9846b3 Support HTML content in the synopsis within the current comic banner 2021-03-07 08:55:51 +01:00
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
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
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
5fd5ff5b64 DB model classes: use explicit, nullptr, override 2021-03-06 21:00:31 +01:00
c5de729635 Set the default button based on the current context 2021-03-06 18:07:29 +01:00
5303e247b7 Always use toggleSkipButton 2021-03-06 18:06:05 +01:00
f98ce43465 Add a shortcut to going back 2021-03-06 18:03:04 +01:00