Commit Graph

72 Commits

Author SHA1 Message Date
Luis Ángel San Martín
1c48f05398 Add support for printing more information in diagnosis log
Also yacreaderlibraryserver can now print this with the --system-info option

This will help when giving support to users.
2024-09-05 17:48:48 +02:00
Luis Ángel San Martín
58ec456fc7 Extract the library QActions to its own file 2024-06-23 19:02:13 +02:00
Luis Ángel San Martín
afa9763499 Add class to coordinate automatic library updates 2023-08-13 10:33:24 +02:00
Luis Ángel San Martín
16faacec65 Debounce input from the search edit
This makes writing there a little bit more pleasant
2023-06-03 20:25:14 +02:00
Luis Ángel San Martín
6a6a239cc7 Add the possibility to show a recently added/updated indicator 2023-05-20 16:17:40 +02:00
Felix Kauselmann
c100edfcd0 Move network interface filtering to separate file 2023-04-07 20:22:49 +02:00
Felix Kauselmann
9f67bb5e53 Server: Port IP detection and filtering to QNetworkInterface 2023-04-07 20:22:49 +02:00
Luis Ángel San Martín
ceb34a1409 Extract sql queries creation for the search engine so we can reuse them 2023-04-07 10:49:09 +02:00
Felix Kauselmann
8f631763ce Replace libqrencode with nayuki/QR-Code-generator 2023-03-25 11:06:17 +01:00
Felix Kauselmann
a35cb979e4 Unix: Fix regression in translation install target
The introduction of CONFIG+= lrelease introduced a regression in the
installation of translation files on systems using make install targets.

This is fixed by replacing the old translation targets with the target
supplied by lrelease.

Fixes #349
2022-10-31 13:19:50 +01:00
Luis Ángel San Martín
4839b416bd Add english translations 2022-10-16 18:20:42 +02:00
Luis Ángel San Martín
424f3c3014 Fix qm files build output in windows 2022-10-16 17:59:41 +02:00
Luis Ángel San Martín
68e67fd777 Copy qm files manually after linking to the output folder
Windows only
2022-10-16 17:25:20 +02:00
Luis Ángel San Martín
75b44558d6 Remove reference to files that aren't in the project yet 2022-10-13 23:31:19 +02:00
Luis Ángel San Martín
be0c0ff341 Rename Startup class to YACReaderHttpServer 2022-10-13 23:24:35 +02:00
Luis Ángel San Martín
7317467a13 Rename class 2022-10-13 21:11:13 +02:00
Luis Ángel San Martín
d2dff7b4a5 Add new type of view to display the content of a folder that doesn't contain comics
It is a replacement for EmptyFolderWidget for now, but it should evolve to show comics and folders
2022-10-09 11:32:06 +02:00
Felix Kauselmann
99114b00e7 Qmake: Use lrelease to automate language file compilation 2022-10-08 19:19:50 +02:00
Luis Ángel San Martín Rodríguez
3b01e993c0 macextras is not available in qt6 2022-09-12 19:24:56 +02:00
Luis Ángel San Martín
bc35b5d65f Fix QML in Qt6
This means having two versions of everything, the idea is to migrate to Qt6, test that everything works fine and drop Qt5 as soon as possible.
2022-09-12 19:24:56 +02:00
BEN ENGLISCH
862c220069 Add libarchive decompression backend 2022-08-31 09:32:23 +02:00
tuwulin
788a3ef434 Update simplified Chinese.
Add traditional Chinese (Hong Kong, Taiwan).
2022-07-06 15:54:54 +02:00
Luis Ángel San Martín
77c96de0ea Remove unused resources 2022-01-15 15:51:59 +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
b0b0849cbc Extract DEFINES += NOMINMAX into common config.pri 2021-12-29 09:36:44 +01:00
Joan Karadimov
2d533949f4 Remove duplicate variables from YACReaderLibrary.pro 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
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
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
2bebe9714e Add files to the project 2021-09-27 15:32:57 +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
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
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
a315021a22 Update qmake files 2021-03-09 18:22:52 +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
12c2ff027a ComicQueryResultProcessor: fix a typo in the class name 2021-02-06 20:08:44 +02:00
Luis Ángel San Martín
74840f9914 Enable SVG explicitly 2021-01-22 10:48:13 +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
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
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
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
4990093e3d Remove c++17 dependency 2021-01-08 15:56:16 +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
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
c13ec618d0 Move QsLog to third_party directory 2020-08-20 17:41:56 +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