Commit Graph

35 Commits

Author SHA1 Message Date
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