Commit Graph

47 Commits

Author SHA1 Message Date
2d533949f4 Remove duplicate variables from YACReaderLibrary.pro 2021-11-02 11:02:32 +01:00
1c3fd4d16f Do not pass MSVC arguments to mingw/gcc 2021-11-02 11:02:32 +01:00
997b82eb79 Add quickcontrols2 to YACReaderLibrary
QtQuick.Controls v1 to v2 migration, yay! -_-
2021-10-19 00:00:09 +02:00
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
2bebe9714e Add files to the project 2021-09-27 15:32:57 +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
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
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
a315021a22 Update qmake files 2021-03-09 18:22:52 +01:00
51a9c72d05 Replace QtScript with QJson*
QtScript is deprecated and this was needed to start supporting Qt6
2021-02-27 12:02:57 +01:00
6f182b2bb3 Extract CONFIG += c++11 into common config.pri 2021-02-18 19:49:43 +01:00
12c2ff027a ComicQueryResultProcessor: fix a typo in the class name 2021-02-06 20:08:44 +02:00
74840f9914 Enable SVG explicitly 2021-01-22 10:48:13 +01:00
24c0a783de Remove reference to lexertl's license 2021-01-14 18:42:21 +01:00
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
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
dbdc7bd965 Add a class for processing search queries and create the comics model data 2021-01-14 09:10:58 +01:00
fa5ce25425 Add concurrent queue based on lambdas 2021-01-14 09:03:17 +01:00
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
4990093e3d Remove c++17 dependency 2021-01-08 15:56:16 +01:00
4a50d438d0 Add query parser class 2021-01-08 15:41:28 +01:00
d3de52ca82 Add commit 43aab01 of BenHanson/lexertl14 from github 2021-01-08 15:41:28 +01:00
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
c13ec618d0 Move QsLog to third_party directory 2020-08-20 17:41:56 +02:00
7ac331ed41 Do not force macos sdk for now
This was commited by mistake
2019-09-21 11:06:51 +02:00
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
e587f59ddb Add support for minimize and start to tray. 2019-09-19 20:22:14 +02:00
ffbe32734e Use the right info.plist file 2019-08-31 10:12:20 +02:00
24fce96220 Disable darkmode for now 2019-08-31 09:35:32 +02:00
607b7b4d6f Remove QMAKE_MAC_SDK from all projects 2019-08-24 11:11:50 +02:00
caca3191f9 Flow: Remove glu dependency 2019-05-06 07:38:33 +02:00
02eda8eeb5 Use QQuickWidget instead of QQuickView to avoid displacement bugs on Windows and Linux 2018-08-11 11:26:12 +02:00
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
f6d389ff35 Add current/next comic view to GridView. 2018-04-23 19:22:51 +02:00
b41884d5db Merge 2018-04-14 10:24:19 +02:00
6313df5407 Make BINDIR, DATADIR and LIBDIR fully configurable 2018-03-11 09:40:30 +01:00
aca67f2b2a merged - develop 2018-03-03 23:36:29 +01:00
4f779f7e22 yacreaderlibrary_ru.ts
Minor corrections in Russian translation.
2018-02-24 18:15:09 +00:00
251dede93d Remove obsolete QGLWidget based cover flow 2018-02-19 14:36:58 +01:00
2cbbf8d433 Headless server: simplify system config logger 2018-01-28 13:32:56 +01:00
e8c6f60c13 Merge 2017-11-26 07:39:08 +01:00
2c914d6579 Support Haiku OS specific libs and compile flags in the build system. 2017-11-03 08:15:46 +01:00
af59672204 Buildsystem: add folders for 64bit build and improve dependencies detection. 2017-10-21 21:49:00 +02:00
958003f52f Fix problems with missing safety checks in Render::fillBuffer and pdfcomic 2017-09-27 22:00:00 +02:00
d20277736d Added model classes for reading lists and labels. 2017-05-26 17:24:56 +02:00
921f6654a2 Added QMAKE_TARGET_BUNDLE_PREFIX to .pro files. 2017-05-23 15:46:29 +02:00
d5c72ad2d1 Update precompiled pdfium for mac to chromium/3071 and add version info file with minimal build instructions 2017-05-07 15:18:00 +02:00