Commit Graph

778 Commits

Author SHA1 Message Date
Luis Ángel San Martín
77c96de0ea Remove unused resources 2022-01-15 15:51:59 +01:00
Luis Ángel San Martín
565bc3a5d0 Replace all uses of devicePixelRatio with devicePixelRatioF 2022-01-14 19:22:50 +01:00
Luis Ángel San Martín
a1e0340b3d Fix some warnings 2021-12-29 17:58:40 +01:00
Luis Ángel San Martín
d8f224645d Remove YACReader::SearchModifiers
They are no longer used
2021-12-29 14:58:03 +01:00
Igor Kushnir
ea2c90011a Library: exit search mode before creating a folder
Creating a folder in search mode selects it and makes the UI look
half-way between Normal and Searching navigation statuses.

An alternative fix is to disable addFolderAction in search mode. But
this is more difficult to implement and inconsistent with the other
always-enabled folder and reading list actions.
2021-12-29 11:02:01 +01:00
Igor Kushnir
40ca07f8f8 Extract YACReaderNavigationController::exitSearchMode() 2021-12-29 11:01:35 +01:00
Igor Kushnir
61cd245037 Document ConcurrentQueue and de-inline its implementation
ConcurrentQueue is currently used only by two classes and a test, but
modifying concurrent_queue.h requires recompiling 30 source files. None
of the member functions is so lightweight as to make it worth inlining.

An alternative to `@note ConcurrentQueue is unable to execute jobs if
@p threadCount == 0.` is `assert(threadCount != 0);`. But this would
force classes that contain a ConcurrentQueue data member to always start
a thread, even if they detect at runtime that they are never going to
enqueue a job.

Add Job type alias to avoid repeating the type.

Use default member initializers instead of the member initializer list
to make it clear [to the reader of the header] that no data member is
left uninitialized.
2021-12-29 09:36:44 +01:00
Igor Kushnir
228fe1284e Fix a typo in ConcurrentQueue::cancelPending function name 2021-12-29 09:36:44 +01:00
Igor Kushnir
b0b0849cbc Extract DEFINES += NOMINMAX into common config.pri 2021-12-29 09:36:44 +01:00
Luis Ángel San Martín
040883a107 Fix static assert when compiling with Qt 6.2.2
QtConcurrent::run doesn't like that reference anymore
2021-12-28 17:48:35 +01:00
Luis Ángel San Martín
55f7c4e1b0 Modify the scale of the cell on mouse over
This will differentiate the mouse over accent vs the selection accent
2021-12-27 16:25:43 +01:00
Luis Ángel San Martín
88de0ae25a Add publication date to the classic comics view table 2021-12-26 20:26:16 +01:00
Luis Ángel San Martín
2cb20cd11e Remove commented code 2021-12-26 20:23:32 +01:00
Luis Ángel San Martín
62464a450c Fix method overriding 2021-12-26 20:22:35 +01:00
Luis Ángel San Martín
868c6aa269 Use the new signal to trigger YACReaderNavigationController::selectedFolder 2021-12-26 17:33:04 +01:00
Luis Ángel San Martín
e882ad272b Qt.labs.animation is not used yet 2021-11-07 09:31:23 +01:00
Joan Karadimov
2d533949f4 Remove duplicate variables from YACReaderLibrary.pro 2021-11-02 11:02:32 +01:00
Joan Karadimov
6aeed9ae90 Include some missing headers 2021-11-02 11:02:32 +01:00
Joan Karadimov
1c3fd4d16f Do not pass MSVC arguments to mingw/gcc 2021-11-02 11:02:32 +01:00
Luis Ángel San Martín
45b94cd8ef Migrate GridComicsView and InfoComicsView to QtQuick and QtQuick.Controls 2.15 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
71b17fe258 Trivial migrations to QtQuick 2.15 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
17064a12e6 Remove qml components what won't be used anymore 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
c5d3ebebc8 Remove commented code 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
997b82eb79 Add quickcontrols2 to YACReaderLibrary
QtQuick.Controls v1 to v2 migration, yay! -_-
2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
89459a470d Use Qt::endl 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
2dbfc6cab5 Simplify connection from QComboBox
All we want is the new text after it changes.
2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
ffc0f9ec8a Don't use QDesktopWidget 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
86a31c0ea5 Use QRegularExpression 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
2c0dccd764 Use constructor explicitly 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
47e7eb3801 Remove unused includes 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
98851cf40f Use Qt::endl 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
0bfa0eb31e More setContentsMargins migrations 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
fe3ae36cc2 Move to QFontMetrics new api 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
542b04287b Remove unused function 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
fdd98fc012 Return Qt::NoItemFlags instead of nullptr 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
509b33e991 Methods are not slots 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
6f1f8198d9 Use MultiMap instead of Map 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
ec95f8f5c3 Do not use screengeometry 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
36227a1354 QtConcurrent::run has changed in Qt6 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
314b6295de Remove qt4 support 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
0bf7977145 background role is now window 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
34aabb0685 Use QTransform instead of QMatrix 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
ec4deaf594 background role is now window 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
8173f9f94c Use setContentsMargins instead of setMargin 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
4c2d6be1ef Use angleDelta instead of delta 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
baccb1a21b Include QRegExp 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
24b2def878 Compare with QString 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
2de4b26b71 Start supporting Qt6
Everything is broken but we want to start fixing as much as possible
2021-10-19 00:00:08 +02:00
Luis Ángel San Martín
5aa02a19bb clang-format 2021-10-18 21:56:52 +02:00
Luis Ángel San Martín
175f533b75 Typo in ComicVine field 2021-09-27 18:45:09 +02:00
Luis Ángel San Martín
def1cd56d0 Fix macos build 2021-09-27 17:45:29 +02:00
Luis Ángel San Martín
80f808bd68 Insert xml info while adding a comic to the library 2021-09-27 15:41:33 +02:00
Luis Ángel San Martín
b4c90a8920 Add support for scanning xml info from the libraries context menu
This will let people to rescan their existing libraries.
2021-09-27 15:40:48 +02:00
Luis Ángel San Martín
dc68387fbc Update ImportWidget to support XML scan mode 2021-09-27 15:39:59 +02:00
Luis Ángel San Martín
da51bd45c6 Use InitialComicInfoExtractor everywhere 2021-09-27 15:39:37 +02:00
Luis Ángel San Martín
2bebe9714e Add files to the project 2021-09-27 15:32:57 +02:00
Luis Ángel San Martín
6e340e5011 Add class for scanning a whole library looking for xml info in all the files 2021-09-27 15:32:39 +02:00
Luis Ángel San Martín
4deb5e1911 Extract and rename ThumbnailCreator to its own files
It adds support for getting XML info files and for skipping cover extraction.
2021-09-27 15:31:49 +02:00
Luis Ángel San Martín
0910937e39 Add function for parsing xml info into ComicInfo 2021-09-27 15:28:47 +02:00
Luis Ángel San Martín
1e81b58e5c Add message about wrong type in ageRating field 2021-09-26 18:44:35 +02:00
Luis Ángel San Martín
b8ad2b540b
Merge branch 'develop' into clazy_autorefactoring 2021-09-26 08:52:23 +02:00
Luis Ángel San Martín
53f92ba1f6 Enable hdpi scaling 2021-09-13 17:34:15 +02:00
Felix Kauselmann
3d9873db75 Always export libraries as .ydb 2021-07-30 08:58:39 +02:00
Felix Kauselmann
768de98c2a Fix cancel button in add library dialog 2021-06-30 17:49:52 +02:00
Felix Kauselmann
a623dfb133 Database Models: Remove obsolete signals
Folder model and comic model contain two signal relais which do not
serve any obvious purpose.
Remove them.
2021-06-29 13:53:12 +02:00
Felix Kauselmann
d7a9e66377 ComicVine: Convert to new slot syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
f1e4396dc5 YACReaderLibrary: Convert a bunch of widgets/dialogs to new slot syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
79d004c42b ComicViews: Convert to new syntax, add clazy exception for QML signals 2021-06-29 13:53:12 +02:00
Felix Kauselmann
a3a1e32198 New slot syntax: Manually convert leftover QButtons
There is a bunch of QButton and similar widget connnections which
cannot be converted to new slot syntax automatically.

Fix them by hand and bundle them for testing.
2021-06-29 13:53:12 +02:00
Felix Kauselmann
485ce1c9d8 Convert Mac toolbar to new slot syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
47324e7f22 Comic/Render: Use overloads refactor some SIGNAL/SLOT connections to new syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
f813a018d2 Comic: Virtual prototype for process(), fix signal/slot 2021-06-29 13:53:12 +02:00
Felix Kauselmann
8377de7c3e Clazy: Use fixits to refactor some old style signal connections 2021-06-29 13:53:12 +02:00
Vítor Galvão
82a94113e1 macOS Info.plis: remove deprecated CFBundleGetInfoString 2021-06-26 00:39:05 +01:00
Luis Ángel San Martín
85677afc7b
Merge pull request #203 from vedgy/fix-library-crash-at-exit-after-deletion
Library: don't crash at exit after a folder or a comic is deleted
2021-06-19 18:13:51 +02:00
Luis Ángel San Martín
91c9375dc1 Fix opening a comic from the current/next comic banner in the grid view 2021-06-19 07:24:29 +02:00
Luis Ángel San Martín
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
Luis Ángel San Martín
af13279c18 Fix open comic signal 2021-06-11 22:36:33 +02:00
Luis Ángel San Martín
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
Igor Kushnir
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
Igor Kushnir
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
Luis Ángel San Martín
4fc60c72aa Update YACReaderLibrary <-> YACReader communication to support reading lists 2021-05-27 18:56:31 +02:00
Luis Ángel San Martín
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
Luis Ángel San Martín
f9285bd099 Add a flag to getReadingListFullContent so it can load all the fields 2021-05-27 18:39:00 +02:00
Luis Ángel San Martín
7bb450408c Extract "query to ComicInfo" to its own method to avoid duplicated code 2021-05-27 18:38:24 +02:00
Luis Ángel San Martín
50840e955d Map the new controller to its path 2021-05-25 21:46:35 +02:00
Luis Ángel San Martín
0333c9f050 Add a new server controller for opening comics from reading lists 2021-05-25 21:45:07 +02:00
Luis Ángel San Martín
6cf11f47e1 Avoid potential null pointer access 2021-05-25 21:41:45 +02:00
Luis Ángel San Martín
6848295ba4 Remove unused imports and forward definitions 2021-05-25 21:40:55 +02:00
Luis Ángel San Martín
e2483217d9 Configure OpenGL settings earlier to avoid wrong state in the options dialog 2021-05-16 09:37:05 +02:00
Luis Ángel San Martín
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
Luis Ángel San Martín
b1713fc184 Fix crash on null pointer 2021-05-16 09:11:00 +02:00
Luis Ángel San Martín
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
Luis Ángel San Martín
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
Ruoh-Shoei LIN
dbe1da58dc Update Simplified Chinese GUI translation for YACReader &
YACReaderLibrary
2021-05-09 11:55:52 +02:00
Luis Ángel San Martín
c3a99b19a5 Fix library creation on 9.8.0 by adding missing manga field to folder 2021-05-08 15:21:30 +02:00
Luis Ángel San Martín
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
Luis Ángel San Martín
b8ad99fcaa Exract struct to reuse it 2021-04-30 09:52:31 +02:00
Luis Ángel San Martín
811c3fcfe4 Add function to get comics from a folder properly sorted 2021-04-30 09:52:10 +02:00
Luis Ángel San Martín
b447226bc1 Avoid indexes out of range when processing v1 updated session data 2021-04-10 09:51:14 +02:00