Luis Ángel San Martín
9e9f035f35
Use Qt::HighDpiScaleFactorRoundingPolicy::PassThrough
...
It will be the default in Qt6 and respecting the scale factor that the user sets is the right thing to do.
2022-03-12 11:51:29 +01:00
Luis Ángel San Martín
f27de78fe1
Fix grid cell selection border
...
Moving the DropShadow broke things in Qt5.15
2022-02-20 18:02:11 +01:00
Luis Ángel San Martín
72670ea6c8
Move connections to happen later
...
Otherwise QQuickItem(s) don't work properly in Qt6. I couldn't find the root cause.
2022-01-19 21:13:53 +01:00
Luis Ángel San Martín
f48201fb91
Initialize fields to nullptr
2022-01-19 21:12:37 +01:00
Luis Ángel San Martín
2d741140e6
Add nullptr check
2022-01-19 21:12:26 +01:00
Luis Ángel San Martín
4bb227aff2
Fix trace message
2022-01-19 21:12:00 +01:00
Luis Ángel San Martín
1b54a407b8
Move common initialization code to the parent class
2022-01-19 19:16:27 +01:00
Luis Ángel San Martín
ab927d791b
Avoid code duplication
2022-01-19 18:30:38 +01:00
Luis Ángel San Martín
8d0beee195
Use parent instead of id
2022-01-19 18:29:09 +01:00
Luis Ángel San Martín
24ad06e839
Remove icon
2022-01-19 18:28:49 +01:00
Luis Ángel San Martín
d73a9a2207
Move DropShadow block
2022-01-19 18:28:38 +01:00
Luis Ángel San Martín
26b4a85928
Rename id
2022-01-19 18:27:22 +01:00
Luis Ángel San Martín
6892a28d0a
Check for undefined and null values in QML
...
Conditional chaining is not available in Qt5.15, so this is uglier than it should be.
2022-01-19 18:24:29 +01:00
Luis Ángel San Martín
68dbd90413
Update listeners definitions
2022-01-19 18:22:04 +01:00
Luis Ángel San Martín
1a25fd0740
Update listeners definitions
2022-01-19 18:20:05 +01:00
Luis Ángel San Martín
f3e08a04d7
Add some initial values for context variables
2022-01-19 18:17:53 +01:00
Luis Ángel San Martín
27383da945
Configure the initial size of the covers
2022-01-19 18:17:04 +01:00
Luis Ángel San Martín
59ae6c5e51
Extract method
2022-01-19 18:16:13 +01:00
Luis Ángel San Martín
2ae9b83bbf
Make sure that opengl is used
...
QQuickWidget requires opengl.
2022-01-19 18:15:36 +01:00
Luis Ángel San Martín
b841aff4a3
Wrap booleans in QVariant when updating the qml context
2022-01-19 18:14:29 +01:00
Luis Ángel San Martín
768d7ee73c
Set initial dummy values for some context references
2022-01-19 18:13:20 +01:00
Luis Ángel San Martín
e80f5a9f64
Move common initialization to the parent class
2022-01-19 18:12:40 +01:00
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
Luis Ángel San Martín
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
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
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
97377cdcf4
Eliminate qsort, use std::sort
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
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
a315021a22
Update qmake files
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
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
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
0f6b203d34
Embrace HTML coming from Comic Vine
2021-03-06 09:05:35 +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
6f182b2bb3
Extract CONFIG += c++11 into common config.pri
2021-02-18 19:49:43 +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
b55c442590
Add missing import
...
It fixes compilation with some compilers
2021-02-08 08:38:15 +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
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
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
f4b2b3d8e3
Update comments
2021-01-28 19:56:35 +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
74840f9914
Enable SVG explicitly
2021-01-22 10:48:13 +01:00
Luis Ángel San Martín
58fdf0af23
Add what's new dialog
2021-01-21 21:39:22 +01:00
Luis Ángel San Martín
3f6c44ce7a
Fix SQL update query for setting manga
in all the comics in a folder
2021-01-17 14:05:14 +01:00
Luis Ángel San Martín
20c772797b
Fix typo
2021-01-16 18:59:53 +01:00
Luis Ángel San Martín
6461a4014e
Add actions for setting folders as manga/normal
2021-01-16 18:31:48 +01:00
Luis Ángel San Martín
d402999991
Set all new imported comics and folders as manga if the parent folder is manga
2021-01-16 18:31:13 +01:00
Luis Ángel San Martín
60de69635b
Get/set new manga field from/to the db
2021-01-16 18:30:25 +01:00
Luis Ángel San Martín
f7fa4adbd0
Add manga
field to folders too
...
This way we can tell the app that a folder contains mangas so the user doesn't have to constantly set comics as manga when new issues are added. And it should be easier to set all the content in a folder as manga from the folder tree.
2021-01-16 18:29:22 +01:00
Luis Ángel San Martín
9643274b39
Enable manga
in the search engine
2021-01-16 14:26:37 +01:00
Luis Ángel San Martín
bc82078ec9
Add new manga field to the edit comic dialog
2021-01-16 14:26:07 +01:00
Luis Ángel San Martín
97c7723b17
Add support for setting issues as manga/normal in the comics view
2021-01-16 14:25:47 +01:00
Luis Ángel San Martín
52953633e5
Send manga field through the server
2021-01-16 14:24:14 +01:00
Luis Ángel San Martín
3ab05c6777
Add a new boolean field for tagging comics as manga
2021-01-16 14:23:59 +01:00
Luis Ángel San Martín
76a307d0d8
Remove comments
2021-01-14 19:11:25 +01:00
Luis Ángel San Martín
6bb64c5467
Import non-gui global header
2021-01-14 18:42:51 +01:00
Luis Ángel San Martín
24c0a783de
Remove reference to lexertl's license
2021-01-14 18:42:21 +01:00
Luis Ángel San Martín
82eb5c0a8b
Add fallback for qt < 5.15
2021-01-14 15:51:20 +01:00
Luis Ángel San Martín
f03ad848cb
Add support for true
and false
literals to be used with bool fields
...
The lexer itself should be responsible for parsing those values but it will require a bigger refactoring.
2021-01-14 15:32:20 +01:00
Luis Ángel San Martín
f803b54f2e
Add support for boolean folder fields
2021-01-14 12:25:24 +01:00
Luis Ángel San Martín
dde60b78ea
YACReaderLibrary compiles using c++11 just fine
...
It is probably worth to bump this to c++14 and ideally use c++17, but it will be done in a separate branch.
2021-01-14 11:38:45 +01:00
Luis Ángel San Martín
5343d24f26
Run folder search filtering in the background
...
It uses the same approach used by the comics search filter
2021-01-14 11:37:17 +01:00
Luis Ángel San Martín
ccc382df7d
Use ComicQueryResultProcesor
2021-01-14 09:17:18 +01:00
Luis Ángel San Martín
dbdc7bd965
Add a class for processing search queries and create the comics model data
2021-01-14 09:10:58 +01:00
Luis Ángel San Martín
fa5ce25425
Add concurrent queue based on lambdas
2021-01-14 09:03:17 +01:00
Luis Ángel San Martín
7b36100458
Use QString::fromStdString
...
Just to keep things consistent in the whole round trip conversion
2021-01-14 08:51:08 +01:00
Luis Ángel San Martín
260f538de3
Use an explicit constructor for TreeNode
...
List initialization ended using movable constructors which surprisingly caused data troubles in release mode, at least in VC2019 compiler. The tree being messed up caused crashes while SQL was generated.
I have no explanation for it.
2021-01-14 08:49:48 +01:00
Luis Ángel San Martín
f09c5955d8
Remove space and atWord tokens
...
`atWord` wasn't used at all and spaces should be eaten by the lexer
And added `unspecified` token
2021-01-14 08:39:16 +01:00
Luis Ángel San Martín
ddb140d430
Remove misplaced code
2021-01-12 18:57:25 +01:00
Luis Ángel San Martín
a777aa3fe8
Replace lexertl with a custom lexeter implementation
...
QueryLexeter does not parse "atWord" because I couldn't find what it is used for.
2021-01-12 18:56:59 +01:00
Luis Ángel San Martín
5037f3ac92
Fix data base removal in FolderModel
2021-01-12 18:41:57 +01:00
Luis Ángel San Martín
6438c9210f
Move query execution and model setup to the right scope
2021-01-12 18:41:09 +01:00
Luis Ángel San Martín
255e51da86
Fix binding values to search query
...
This was broken while doing a rebase
2021-01-08 16:59:17 +01:00
Iain Benson
8efb9912ee
Use concatenation, rather than ostringstream
2021-01-08 15:56:16 +01:00
Luis Ángel San Martín
4990093e3d
Remove c++17 dependency
2021-01-08 15:56:16 +01:00
Luis Ángel San Martín
2d3888b4b4
Fix scopes
2021-01-08 15:56:13 +01:00
Luis Ángel San Martín
7ccb338455
Apply clang-format
2021-01-08 15:51:59 +01:00
Iain Benson
9a660350d2
Add some documentation and attribution to the query parser
2021-01-08 15:51:59 +01:00
Iain Benson
30529dca43
Some small tidy ups
2021-01-08 15:51:56 +01:00
Iain Benson
673ee1f067
Use the query parser in the comic and folder model
2021-01-08 15:41:29 +01:00
Iain Benson
5fa7da1e46
Add folder into the query parser
2021-01-08 15:41:29 +01:00
Iain Benson
4a50d438d0
Add query parser class
2021-01-08 15:41:28 +01:00
Iain Benson
d3de52ca82
Add commit 43aab01 of BenHanson/lexertl14 from github
2021-01-08 15:41:28 +01:00
Felix Kauselmann
c4f792bd40
Fix port settings
...
When setting ports, temporary or for good, we need to go via the config
files and not QTcpServer or we get undefined behavior. To support temp
ports, we need to back up the fixed port in the settings.
2020-12-11 12:33:05 +01:00
Luis Ángel San Martín
e79ea56d32
Fix format
2020-12-05 14:49:54 +01:00
Heimen Stoffels
ccf1e4cb56
Updated Dutch translation
2020-10-01 11:56:35 +02:00
Igor Kushnir
04140bef0b
Remove an unnecessary indirection in ComicFlow
...
The timer pointer forced error-prone manual memory management without
any benefits.
2020-08-31 15:45:12 +02:00
Igor Kushnir
cb7c967252
Add WorkerThread class and use it in ComicFlow
...
In a later commit WorkerThread should also replace classes similar to
ImageLoader: PageLoader, ImageLoaderGL and ImageLoaderByteArrayGL.
Bugs fixed:
1. Eliminated a data race between ImageLoader::run() and
ComicFlow::updateImageData()->ImageLoader::result(). Specifically when
ImageLoader::busy() returns false, then ImageLoader::run() sets
ImageLoader::working to true, loads the image and starts assigning it to
ImageLoader::img, while ImageLoader::result() is accessed without
locking from updateImageData().
Making ImageLoader::working atomic is clearly insufficient to eliminate
this data race. The fix is to set 'working' to true immediately and
synchronously as soon as a new task is assigned to the worker.
2. Replaced thread termination with graceful thread exit. ComicFlow
destructor called QThread::terminate(), using which is discouraged by Qt
documentation. The application exited without errors in Release mode.
In Debug mode, however, it received the SIG32 signal on exit and printed
the following warning - "QWaitCondition: mutex destroy failure:
Device or resource busy".
The loop in WorkerThread::run() is no longer endless. The worker thread
properly ends and is joined in WorkerThread destructor.
Design decisions:
1. WorkerThread could emit a signal when it completes a task.
Thus updateTimer could be removed from ComicFlow and GoToFlow. However,
there is no obvious way to use this new signal in the two GL classes.
Also I don't know whether updateTimer is just an inefficient polling
substitute for notification or an intentional animation mechanism.
2. The index variable is no longer stored in the worker class, but in
ComicFlow directly. Thing is, this data member was never actually
accessed by the worker, but ComicFlow went so far as to lock worker's
mutex to "protect" access to the index.
3. The common ImageLoader implementation turned out to be very general.
So I converted it into the WorkerThread class template that is not
restricted to producing QImage results and can be reused elsewhere.
4. I used standard classes (such as std::thread) instead of their Qt
equivalents (e.g. QThread) because they are more thoroughly documented.
The standard classes should also be more efficient as they were more
carefully designed and provide much fewer unnecessary features.
5. Release-Acquire ordering is safe for the WorkerThread::working
use case and is more efficient than the std::atomic-default
Sequentially-consistent ordering.
6. condition.notify_one() is called while the mutex is unlocked
to improve performance. This is safe in both cases:
a) if the worker thread exits due to a spurious wakeup just before
the condition.notify_one() call in WorkerThread destructor, so much the
better;
b) if a spurious wakeup lets the worker thread finish the task and
start waiting on the condition again just before the
condition.notify_one() call in WorkerThread::performTask(), the second
waking will be ignored by the worker thread as 'working' and 'abort'
will be false then.
2020-08-31 15:45:12 +02:00
Felix Kauselmann
4a654c38c0
Headless server: Add support for setting a port from commandline
...
Manual editing of a config file for setting a port is not ideal.
Solution: add a set-port command to save a port and also a
--port option to allow setting a temporary port during startup
2020-08-29 18:21:06 +02:00
Luis Ángel San Martín
b64ea19e8b
Use an invalid QVariant to set to NULL a value in the DB
...
nullptr causes troubles in some platforms/compiles
2020-08-25 19:45:05 +02:00
Luis Ángel San Martín
f11a757141
Code format
...
I had to update clang-format
2020-08-25 19:13:43 +02:00
Luis Ángel San Martín
5bc3ad5014
Send back more recent comic status to the client on sync
2020-08-25 19:03:00 +02:00
Luis Ángel San Martín
2b780e23a4
Make updateFromRemoteClient
return more updated comics
...
So they can be sent back to the client.
2020-08-25 19:01:43 +02:00
Luis Ángel San Martín
fe15bc2ba8
Include "last_time_opened" in JSON serialization
2020-08-25 19:01:03 +02:00
Luis Ángel San Martín
c84fc20419
Reset last time opened when setting a comic as unread
2020-08-25 19:00:21 +02:00
Felix Kauselmann
4b3042def4
Fix object leaks in database code
...
Qt's database and query model requires that both the queries and the database
objects are out of scope before a database connection can safely be removed.
Solution: Properly encapsulate databases and queries in "{ }" and use a string
to cache the connection name for out-of-scope removal.
2020-08-25 17:34:46 +02:00
Felix Kauselmann
1b344d70e5
Update server code integration for QtWebApp 1.7.11
...
- Adapt server code for QtWebapp namespace 'stefanfrings'
- Implement custom modifications needed by v1 controller
via template engine
- Unify iphone and ipad templates
2020-08-20 18:22:57 +02:00
Felix Kauselmann
3de099491f
Move QtWebApp sources to third_party
2020-08-20 18:22:57 +02:00
Felix Kauselmann
1af613663c
Fix QsLog setup in Library and LibraryServer
...
The calls changed, so we need to adapt them.
2020-08-20 17:41:56 +02:00
Felix Kauselmann
c13ec618d0
Move QsLog to third_party directory
2020-08-20 17:41:56 +02:00
Felix Kauselmann
b9acd13120
Fix code format errors due to changes in default coding style. ( #150 )
2020-07-24 21:17:49 +02:00
Jan Beich
65a77daa75
Explicitly include <sys/socket.h>
...
server_config_dialog.cpp:57:30: error: member access into incomplete type 'struct sockaddr'
if (ifa->ifa_addr->sa_family == AF_INET) { // check it is IP4
^
/usr/local/include/qt5/QtNetwork/qhostaddress.h:50:8: note: forward declaration of 'sockaddr'
struct sockaddr;
^
server_config_dialog.cpp:61:27: error: use of undeclared identifier 'AF_INET'
inet_ntop(AF_INET, tmpAddrPtr, addressBuffer, INET_ADDRSTRLEN);
^
server_config_dialog.cpp:64:37: error: member access into incomplete type 'struct sockaddr'
} else if (ifa->ifa_addr->sa_family == AF_INET6) { // check it is IP6
^
/usr/local/include/qt5/QtNetwork/qhostaddress.h:50:8: note: forward declaration of 'sockaddr'
struct sockaddr;
^
server_config_dialog.cpp:68:27: error: use of undeclared identifier 'AF_INET6'
inet_ntop(AF_INET6, tmpAddrPtr, addressBuffer, INET6_ADDRSTRLEN);
^
2019-11-26 19:03:34 +00:00
Luis Ángel San Martín
e1b0e7c96f
Fix full screen mode in windows with qt 5.12.4+
2019-09-28 10:11:44 +02:00
ivanvranjic
346bcdaf75
Clang format fix.
2019-09-25 17:38:59 +02:00
Ivan Vranjic
cfb4e31af9
Fix for story arcs not being parsed from comicvine.
2019-09-25 17:38:59 +02:00
Luis Ángel San Martín
0b83764734
Revert "Thread ping pong"
2019-09-24 12:00:21 +02:00
Felix Kauselmann
be547081f2
Fix huge memleak in server code caused by thread pingpong fix.
...
Stopped QThreads don't process events, so cleanup signals get lost.
Prevent this from happening by keeping the threads alive and the comic
inside the thread (as we already do in the viewer). Cleanup happens by
connecting the comic's destroyed() signal to the thread's quit() slot.
2019-09-24 08:21:14 +02:00
Luis Ángel San Martín
68ae40fda7
Fix restoring the window from a minimized state
2019-09-22 15:04:54 +02:00
Luis Ángel San Martín
6990ba0765
Use showNormal
in macos and show
in other platforms
2019-09-22 13:27:06 +02:00
Luis Ángel San Martín
1ddf0038b8
Use Trigger in linux, we have seen some setups were double click is not reported
2019-09-22 13:14:02 +02:00
Luis Ángel San Martín
94d17a1d5c
Use "show" instead of "showNormal" to keep maximized geometry
2019-09-22 13:08:10 +02:00
Luis Ángel San Martín
fc85f77d15
Use LibraryWindow::closeApp to exit from the system tray context menu
2019-09-21 12:12:19 +02:00
Luis Ángel San Martín
9fafa06063
Move call forward
2019-09-21 12:11:56 +02:00
Luis Ángel San Martín
674fa21717
Pass a more specific instance of our main window
2019-09-21 12:11:39 +02:00
Luis Ángel San Martín
ef8216b338
Make closeApp work with no event
...
And exit using QApplication.exit so we don't mess with window events to exit the app
2019-09-21 12:11:03 +02:00
Luis Ángel San Martín
7ac331ed41
Do not force macos sdk for now
...
This was commited by mistake
2019-09-21 11:06:51 +02:00
Luis Ángel San Martín
8e99d9e59f
Extract the system tray functionality to its own class
...
LibraryWindow is already a monster, so we'll try to not make it bigger.
2019-09-21 10:47:01 +02:00
Luis Ángel San Martín
3c07e7269a
Update the UI string about system tray support
2019-09-21 10:45:34 +02:00
Luis Ángel San Martín
5b78ef2dae
Use new property name and set false as default
2019-09-21 10:44:28 +02:00
Luis Ángel San Martín
b5f3799753
Restore the code to start the app into the system tray
2019-09-21 10:44:03 +02:00
Luis Ángel San Martín
63e16e44b7
Better macos tray icon
2019-09-20 16:38:11 +02:00
Luis Ángel San Martín
403e657062
A new trayicon is needed for macos
2019-09-20 13:41:26 +02:00
Luis Ángel San Martín
6031c81d81
Add better icons for the system tray in macos and windows
...
I would like to design specific icons for the system tray at some point, but for now this is what we have.
2019-09-20 10:07:20 +02:00
Luis Ángel San Martín
4377ad935c
Fixed more merge problems
2019-09-19 22:54:08 +02:00
Luis Ángel San Martín
8f845727ae
Fixed more merge problems
2019-09-19 22:49:00 +02:00
Luis Ángel San Martín
a0f682be7b
Merge went bad
...
Hopefully this is all that got messed up
2019-09-19 22:32:07 +02:00
Luis Ángel San Martín
a632480422
Format
2019-09-19 21:16:56 +02:00
Felix Kauselmann
e587f59ddb
Add support for minimize and start to tray.
2019-09-19 20:22:14 +02:00
Luis Ángel San Martín
a6bfd44aec
Remove clear from sql query
...
It was committed by mistake
2019-09-16 23:44:30 +02:00
Luis Ángel San Martín
ffbe32734e
Use the right info.plist file
2019-08-31 10:12:20 +02:00
Luis Ángel San Martín
24fce96220
Disable darkmode for now
2019-08-31 09:35:32 +02:00
Luis Ángel San Martín
9056fffb66
Use db transactions when updating the progress from iOS
...
Timeouts were a problem before.
2019-08-24 13:31:52 +02:00
Luis Ángel San Martín
1fd0837163
Revert change
2019-08-24 11:11:52 +02:00
Luis Ángel San Martín
ff8c1bcf3f
Make a change to break the code format and check that CI is able to detect the problem
2019-08-24 11:11:52 +02:00
Luis Ángel San Martín
f875e7d304
Disable sort includes in the folders where clang format is disabled
...
For me this is a bug, DisableFormat should stop any kind of changes.
2019-08-24 11:11:52 +02:00
Luis Ángel San Martín
607b7b4d6f
Remove QMAKE_MAC_SDK from all projects
2019-08-24 11:11:50 +02:00
Luis Ángel San Martín
fafcfdd2dc
Give the OK to the connection asap
2019-08-24 11:07:36 +02:00
Luis Ángel San Martín
4f4c562a33
Add setting to disable the continue reading banner in the grid view
2019-08-11 11:47:14 +02:00
Luis Ángel San Martín
901d0ab03a
Fix Potential fix for GridComicsView in Qt 13
2019-08-11 10:15:44 +02:00
Luis Ángel San Martín
4126fc71c3
Remove unused variables
2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
f29724e404
Annotate overridden methods
2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
e2276cbc1c
More auto
2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
268bebbddd
Use nullptr instead of 0
2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
bb334cfd50
Use auto to avoid duplicating the type name
2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
e3ec56aa43
Format code using clang-format
2019-05-30 19:46:37 +02:00
Luis Ángel San Martín
8b54744723
Add .clang-format files
...
Third party code should be excluded from automatic formating: QsLog and QtWebApp
2019-05-30 18:58:54 +02:00
Luis Ángel San Martín
ca34e99ec4
Merge pull request #57 from vedgy/misc-code-fixes
...
Miscellaneous code fixes
2019-05-30 18:24:53 +02:00
Luis Ángel San Martín
6c628318fe
Merge pull request #54 from vedgy/fix-crash-at-exit
...
Library: fix a crash at exit when server is disabled
2019-05-30 18:22:06 +02:00
Luis Ángel San Martín
7b712e144a
Merge pull request #53 from selmf/light_gl_flow_refactoring
...
Light gl flow refactoring
2019-05-30 18:21:05 +02:00
Jeremy Douglass
6f2a4bf243
Add Up Down navigation to FlowView
...
Adds vertical navigation (up down) to FlowView. This corresponds visually to the File Name list display -- especially when the flow pane is hidden, pressing up-down is the intuitive way to navigate up-down in the list.
2019-05-30 18:15:33 +02:00
Igor Kushnir
c1810b9e54
Library: do not needlessly retrieve all comics from the DB
...
The siblings variable is unused. So the ComicModel::getAllComics() call
is redundant unless there is some unobvious side effect (I hope not).
2019-05-24 14:53:52 +03:00
Igor Kushnir
92cf54980c
Library: eliminate QPainter warnings
...
There were many run-time warnings in YACReaderLibrary built in Debug
mode with hardware acceleration disabled and with ClassicComicsView
as the active comics view:
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
The ComicFlowWidgetSW::paintEvent() implementation now corresponds to
ComicFlowWidgetGL::paintEvent(), which has been fixed earlier.
QWidget::repaint() calls paintEvent() immediately.
PictureFlow::paintEvent() calls d->renderer->paint(). So the
d->renderer->paint() call in PictureFlow::updateMarks() was redundant.
2019-05-22 17:37:04 +03:00
Igor Kushnir
8522b11e37
Library: fix a crash at exit when server is disabled
...
Startup::stop() called from LibraryWindow::closeEvent() crashes if
listener is not initialized.
2019-05-19 13:50:53 +03:00
Felix Kauselmann
caca3191f9
Flow: Remove glu dependency
2019-05-06 07:38:33 +02:00
Luis Ángel San Martín
eeb303a5c1
Avoid parsing non supported dates from comic vine
2019-04-28 09:30:15 +02:00
Luis Ángel San Martín
44db4397e8
Avoid parsing null values from comic vine
2019-04-28 09:28:50 +02:00
Luis Ángel San Martín
54a0610a06
Fix out of bounds crash
2019-04-28 09:28:15 +02:00
François Gannaz
8c8521a8dc
Library: reorder initialization of ResponseParser
2019-04-01 11:25:16 +02:00
François Gannaz
ebcb52bf16
Library: bugfix a 'switch case' that had no 'break'
2019-04-01 11:25:16 +02:00
François Gannaz
0453bf126a
Library: unused method parameter, so comment out the name
2019-04-01 11:25:16 +02:00
François Gannaz
9aff260f06
Library: unused method parameter, so comment out the name
2019-04-01 11:25:16 +02:00
François Gannaz
6467e2a510
Library: unused method parameter, so comment out the name
2019-04-01 11:25:16 +02:00
François Gannaz
3657745f8b
Library: reorder initialization of YACReaderHttpSession
2019-04-01 11:25:16 +02:00
François Gannaz
8fa62c3a20
Library: unused method parameter, so comment out the name
2019-04-01 11:25:16 +02:00
François Gannaz
7cb57d886a
Library: fix misleading indentation
2019-04-01 11:25:16 +02:00
François Gannaz
f351e41fa0
Library: add missing 'case' to a 'switch'
2019-04-01 11:25:16 +02:00
François Gannaz
11c99efa30
Library: explicit braces to avoid ambiguous 'else' (hidden in macro)
2019-04-01 11:25:16 +02:00
François Gannaz
62db328ab5
Library: explicit braces to avoid ambiguous 'else'
2019-04-01 11:25:16 +02:00
François Gannaz
20bcd2235a
Library: explicit braces to avoid ambiguous 'else'
2019-04-01 11:25:16 +02:00
François Gannaz
6f9d03847a
Library: typecast in comparison of int and long u int
2019-04-01 11:25:16 +02:00
François Gannaz
5927b1be45
Library: remove unused variables (shadowed by object attributes)
2019-04-01 11:25:16 +02:00
François Gannaz
6093e003e9
Library: add missing 'default' to non-exhaustive 'switch'
2019-04-01 11:25:16 +02:00
François Gannaz
b77eaf6d9c
Library: reorder initialization of FolderModel
2019-04-01 11:25:16 +02:00
François Gannaz
9c3720ceb9
Library: fix misleading indentation
2019-04-01 11:25:16 +02:00
François Gannaz
fb97cfa1dc
Library: explicit {} on ambiguous 'if if else'
2019-04-01 11:25:16 +02:00
François Gannaz
2189e19a91
Library: fix misleading indentation
2019-04-01 11:25:16 +02:00
François Gannaz
3babc0980e
Library: remove unused variable
2019-04-01 11:25:16 +02:00
François Gannaz
66941510f0
Library: fix misleading indentation
2019-04-01 11:25:16 +02:00
François Gannaz
2274e49ed0
Library: fix misleading indentation
2019-04-01 11:25:16 +02:00
François Gannaz
c044e93446
Library: typecast in comparison of int and quint64
2019-04-01 11:25:16 +02:00
François Gannaz
f7b4b7a5d1
Library: add missing 'case' to a 'switch'
2019-04-01 11:25:16 +02:00
François Gannaz
3062d8826e
Library: reorder initialization of LibraryWindow
2019-04-01 11:25:16 +02:00
Luis Ángel San Martín
c2fdcfde00
Merge pull request #30 from jlesage/fix-stack-overflow
...
Fixed potential stack overflow.
2019-02-18 17:19:50 +01:00
Luis Ángel San Martín
88f886078f
Merge pull request #4 from selmf/qquickwidget-port
...
Qquickwidget port
2019-02-18 17:18:00 +01:00
Jocelyn Le Sage
b3583b9bf3
Fixed potential stack overflow.
2018-09-01 08:10:18 -04:00
votagif
d13d85c6a4
Update yacreaderlibrary_ru.ts
...
Text correction, minor corrections.
2018-08-25 07:49:51 +03:00
Felix Kauselmann
097f4f1445
Fix qml qrc files
2018-08-15 14:43:14 +02:00
Felix Kauselmann
7bfb42be24
rating menu: Remove unneeded qml files
2018-08-11 11:34:12 +02:00
Felix Kauselmann
833e501d7c
Remove redundant MenuBar in GridComicsView.qml to avoid crashes on macOS
...
This fix was originally proposed by @ShawnCarnell on YACReader's old
Bitbucket repository.
2018-08-11 11:31:13 +02:00
Felix Kauselmann
02eda8eeb5
Use QQuickWidget instead of QQuickView to avoid displacement bugs on Windows and Linux
2018-08-11 11:26:12 +02:00
Felix Kauselmann
ab96056b0e
Normalize line endings
...
Normalize the line endings for a bunch of files previously not covered
by .gitattributes.
2018-08-07 11:09:02 +02:00
Felix Kauselmann
d3b8f4d5b8
Normalize line endings for .qml files
2018-08-05 13:14:30 +02:00
Felix Kauselmann
0e9a3a6407
Stop QtWebApp from eating out debug messages
...
QtWebapp installs a custom logger/message handler which reroutes all
debug messages to it's custom logger class.
As the default logging level for QtWebApp's logger is set to "critical"
this means that all debug messages are sent to nirvana. Solution:
Replace QtWebApp's messageHandler with our own (using QsLog).
2018-08-04 12:31:34 +02:00
Felix Kauselmann
3530528282
Add a commandline option to set YACReaderLibrary opengl renderer on windows.
2018-08-04 12:31:34 +02:00
Felix Kauselmann
afad6c7ab7
Add parser option for setting loglevel to YACReaderLibrary and YACReaderLibraryServer
2018-08-04 12:31:34 +02:00
Felix Kauselmann
d5a11fb16b
Add .gitattributes rules for text and binary handling
2018-07-30 15:04:04 +02:00
Luis Ángel San Martín
6538d418c7
Update translations.
2018-06-16 08:28:50 +02:00
toto
06246e34d3
ComicInfoView translation
...
Add translation to ComicInfoView.qml
2018-06-14 22:35:34 +02:00
toto
0b552bc726
Translate
...
French translation
2018-06-14 22:35:34 +02:00
Luis Ángel San Martín
8921b016a5
Avoid null values for issues' title coming from Comic Vine
2018-05-31 18:31:32 +02:00
Luis Ángel San Martín
1a91206a2d
Merge branch 'develop' into 9.5.0_bugfixes
2018-05-31 18:12:52 +02:00
Luis Ángel San Martín
229afbc9a9
Fix crash caused by accessing the UI thread from a background thread.
...
ComicVineDialog was calling close from background, plus accepted is emmited from a background thread, so it needs a QueuedConnection.
2018-05-31 18:09:41 +02:00
Luis Ángel San Martín
26c2226032
Change endpoints for getting comic info and opening a comic.
2018-05-30 19:23:39 +02:00
Luis Ángel San Martín
0100da5480
Make comicdownloadinfocontroller_v2 provide all the needed information.
2018-05-30 19:02:52 +02:00
Luis Ángel San Martín
dba264c31f
Remove old commented code.
2018-05-29 17:12:34 +02:00
Luis Ángel San Martín
79db01cffc
Do not close the connection in librariescontroller_v2
2018-05-29 17:12:22 +02:00
Luis Ángel San Martín
550795e418
Do not close the connection in covercontroller_v2
2018-05-29 17:12:09 +02:00
Luis Ángel San Martín
9cc4f65fc8
Use older api currentSecsSinceEpoch was introduced in Qt 5.8
2018-05-28 21:18:11 +02:00
Felix Kauselmann
1ccb40624c
Remove potential memleak in folder model code
2018-05-26 11:32:59 +02:00
Felix Kauselmann
ca3bc94f25
Fix potential memleak caused by unused QAction pointer in SortVolumeComics
2018-05-26 11:09:28 +02:00
Felix Kauselmann
9851884021
Backport two nullpointer reference fixes from QtWebApp 1.7.4
2018-05-26 10:30:14 +02:00
Luis Ángel San Martín
1c4eb4d1c6
Fix comicRating possition after context menu workaround
2018-05-25 19:31:32 +02:00
Luis Ángel San Martín
1cd33197cc
Set hasBeenOpened as true if currentPage > 1
...
I have seen comics opened with hasBeenOpened to false.
2018-05-25 19:28:20 +02:00
Luis Ángel San Martín
d909598732
Add missing include.
...
This fixes compilation windows debug.
2018-05-25 19:26:17 +02:00
Luis Ángel San Martín
786c28bba0
Add workaround for rating context menu crashing in macos
...
For now we will have two different versions of the rating component.
2018-05-24 19:02:01 +02:00
Luis Ángel San Martín
6faea2b5a7
Disabled minimize to system tray for now.
...
App icon needs some work to look ok in Windows 10 system tray and macos is not ready yet to fully support this.
2018-05-23 17:24:04 +02:00
Luis Ángel San Martín
a8655b1037
All lists should load the coverSizeRatio
2018-05-22 18:58:33 +02:00
Luis Ángel San Martín
450997762e
Current comic view only makes sense for folders and reading lists.
2018-05-22 18:45:12 +02:00
Luis Ángel San Martín
4be84c6845
Set TraceLevel for logging only in debug builds.
2018-05-22 18:16:55 +02:00
Luis Ángel San Martín
66d1bd1046
Merge branch 'server_2.0' into develop
2018-05-22 18:10:24 +02:00
Luis Ángel San Martín
317f2b839f
Remove setting last time opened.
...
The value should come from the client.
2018-05-21 23:14:51 +02:00
Luis Ángel San Martín
1b63dc01db
Remove comment.
2018-05-21 23:14:12 +02:00
Luis Ángel San Martín
66aa2c60c6
Fix comparison
2018-05-21 23:14:02 +02:00
Luis Ángel San Martín
8ea201ece9
Use usigned long long to fix compiler error
2018-05-21 23:13:47 +02:00
Luis Ángel San Martín
e77d613002
Update last time opened when updating reading progress from ios client.
2018-05-21 22:13:07 +02:00
Luis Ángel San Martín
38e3b40e8f
Process last time opened in sync controller
2018-05-21 22:10:53 +02:00
Luis Ángel San Martín
d6c563e881
If a comic doesn't have library and id info, then try to update the info in all the libraries.
2018-05-21 19:52:29 +02:00
Luis Ángel San Martín
6cfd09a8b8
Add method for updating reading comic information given a hash.
2018-05-21 19:51:30 +02:00
Luis Ángel San Martín
0e4ffb15a6
Fix update from remote client.
...
current page has to be set before checking for read.
2018-05-21 19:50:28 +02:00
Felix Kauselmann
15e5618454
Add a simple qml error logger to YACReaderLibrary
2018-05-21 15:16:20 +02:00
Luis Ángel San Martín
5c876e6785
Make YACReader send info for the next comic.
...
Now we can set the next comic as reading.
2018-05-20 17:43:28 +02:00
Luis Ángel San Martín
50c9238376
Only try to set the next comic as read if there is a next comic.
2018-05-20 17:42:49 +02:00
Luis Ángel San Martín
c93e86af12
Fix loading some missing fields from database
2018-05-20 15:33:11 +02:00
Luis Ángel San Martín
e405f14256
Set next comic as reading from update comic controller.
2018-05-20 14:49:32 +02:00
Luis Ángel San Martín
1503fe5383
Add method for marking a comic as reading without opening it first.
...
Usefull when closing the a comic in the last page to mark the next one and the next being readed.
2018-05-20 14:49:07 +02:00
Luis Ángel San Martín
45e44fa54f
Only set a comic as reading if it has been opened beyod the cover.
2018-05-20 14:48:08 +02:00
Luis Ángel San Martín
23823725ac
Fix how we consider a comic as being read.
...
Basically is this: it has been opened and not set as READ.
2018-05-20 14:41:55 +02:00
Luis Ángel San Martín
d3bb598a7d
Add controllers to provide comics information from reading lists and labels
2018-05-01 11:54:00 +02:00
Luis Ángel San Martín
0e45767e67
Check for comic opening failures before trying to serve a page.
2018-04-28 18:00:40 +02:00
Luis Ángel San Martín
618f6575b2
Fix error code in page controller
2018-04-28 17:57:06 +02:00
Luis Ángel San Martín
4e004f87af
Fix compilation in windows.
2018-04-27 22:40:36 +02:00
Luis Ángel San Martín
451c2ec688
Fix label content controller v2
2018-04-26 22:19:16 +02:00
Luis Ángel San Martín
b92b696458
Fix favorites controler v2
2018-04-26 22:18:56 +02:00
Luis Ángel San Martín
f3e8f1a6cd
Fix label to json
2018-04-26 22:18:25 +02:00
Luis Ángel San Martín
dc992edb55
Fix color loading for labels.
2018-04-26 22:18:12 +02:00
Luis Ángel San Martín
4deec13cff
Fix background color of the current comic list in macosx
2018-04-26 22:17:11 +02:00
Luis Ángel San Martín
505d54d8b4
Remove outdated comments.
2018-04-26 18:29:36 +02:00
Luis Ángel San Martín
e4b4f96369
Use better http status code to notify clientes about what is going on while loading comics.
2018-04-26 18:27:42 +02:00
Luis Ángel San Martín
30211233af
Use compact json in responses.
2018-04-26 18:26:44 +02:00
Luis Ángel San Martín
87b0e64b1a
Monitorize folder content controller performance in debug mode.
2018-04-26 18:24:35 +02:00
Luis Ángel San Martín
630a5c94a0
Move from session based state to client side tokens.
...
YACReaderHttpSession is still used, but it is not a http session anymore.
2018-04-25 22:20:03 +02:00
Luis Ángel San Martín
701817d76b
Update comic url to use v2.
...
This should be replaced with json and the url shouldl be built in the client side.
2018-04-25 22:17:51 +02:00
Luis Ángel San Martín
52c76d5482
Create unique database connections per thread and remove them using the database connection name from the QSqlDatabase instance being used.
2018-04-24 20:53:24 +02:00
Luis Ángel San Martín
0ff7da1d2c
boolean is not a standard c++ type
2018-04-24 16:53:47 +02:00
Luis Ángel San Martín
3cff8b59e7
Add some undefined values wrapping.
2018-04-24 16:32:21 +02:00
Luis Ángel San Martín
db66fe33f3
Merge
2018-04-24 14:44:23 +02:00
Luis Ángel San Martín
30c8cf180e
Fix loadComic not loading the comic file name.
2018-04-24 14:43:42 +02:00
Luis Ángel San Martín
0305377c28
Migrate some more controllers to json.
2018-04-24 14:42:30 +02:00
Luis Ángel San Martín
a9887a2d46
Add methods for getting json from reading lists and labels(tags)
2018-04-24 14:42:06 +02:00
Luis Ángel San Martín
a4072b956c
Merge
2018-04-23 19:26:00 +02:00
Luis Ángel San Martín
20c7ecadd4
Add new controller for requesting the "full" information for a comic.
...
For now it doesn't serve the full information, only the information shown in the current/next comic view in iOS. I will see if I create two separated controllers or just on sending all the information when more information is needed in another iOS view.
2018-04-23 19:24:56 +02:00
Luis Ángel San Martín
1f7ec3950f
ComicInfo.qml is now ComicInfoView.qml
2018-04-23 19:23:15 +02:00
Luis Ángel San Martín
f6d389ff35
Add current/next comic view to GridView.
2018-04-23 19:22:51 +02:00
Luis Ángel San Martín
b41884d5db
Merge
2018-04-14 10:24:19 +02:00
Luis Ángel San Martín
b3d4e4c11e
Include comics' hash in download information.
2018-04-14 10:02:08 +02:00
Luis Ángel San Martín
9a473ae214
Send the full cover for now. Clients will resize and cache them as needed.
2018-04-14 10:01:41 +02:00
Felix Kauselmann
39a626625d
MacOS: Replace qrencode executable with dynamically loaded libqrencode.
2018-03-30 14:40:54 +02:00
Felix Kauselmann
d9d94b103a
Fix YACReader launch on MacOS
2018-03-30 14:14:43 +02:00
Luis Ángel San Martín
9db998174f
Use an integer as num_childer in folder.
2018-03-30 10:15:49 +02:00
Luis Ángel San Martín
c1ba2fe77e
Use json in foldercontentcontoller_v2
2018-03-25 13:15:49 +02:00
Luis Ángel San Martín
c36d4501cc
Fix update remote reading query, a coma was missing.
2018-03-24 21:00:27 +01:00
Luis Ángel San Martín
2bb258df13
Load the coverSizeRatio from DB.
2018-03-24 08:20:29 +01:00
Luis Ángel San Martín
113cf341c0
Fix comic title and number json serialziation
2018-03-24 08:19:23 +01:00
Luis Ángel San Martín
1fc3c2eee7
Add title and number to comic information and fix file name field.
2018-03-22 20:11:42 +01:00
Luis Ángel San Martín
177e3ea3ba
Send the cover size ratio in the comic info json.
2018-03-13 19:08:39 +01:00
Luis Ángel San Martín
f8527b9a03
Add a new type of "look" to the import widget. It is going to be used as the "upgrading..." view while a library is being upgraded.
2018-03-12 21:43:24 +01:00
Luis Ángel San Martín
910ec62d30
Update the cover information if a different cover is selected.
2018-03-12 21:25:51 +01:00