Commit Graph

247 Commits

Author SHA1 Message Date
Luis Ángel San Martín
a56914bec3 Do not use foreach 2021-10-19 00:00:07 +02:00
Luis Ángel San Martín
c1d3fb0778 Proper use of range for 2021-10-19 00:00:07 +02:00
Luis Ángel San Martín
c03b1075f3 Do not mix const an non-const iterators 2021-10-19 00:00:07 +02:00
Luis Ángel San Martín
5557cfe5b3 Remove unused variable 2021-10-19 00:00:07 +02:00
Luis Ángel San Martín
e1ed292a91 Convert emit(signal()) calls to emit signal() 2021-10-19 00:00:07 +02:00
Luis Ángel San Martín
5aa02a19bb clang-format 2021-10-18 21:56:52 +02:00
Luis Ángel San Martín
a77facce6d Add helper properties for parsing day/month/year sequentially 2021-09-27 15:28:05 +02:00
Luis Ángel San Martín
b0a6411528 Initialize attributes in constructor 2021-09-27 15:27:44 +02:00
Felix Kauselmann
76ab23b776 Common: Convert last signals 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
ae8e47d863 Clazy: Add second batch of SIGNAL/SLOT removal 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
Luis Ángel San Martín
891546b423 9.8.2 release 2021-06-19 18:13:01 +02:00
Luis Ángel San Martín
1c382aef72 Update version to 9.8.1 2021-06-02 18:57:41 +02:00
Luis Ángel San Martín
51284cb652 Add new struct to represent the source where a comic can be opened from
A comic always belongs to a Folder, but when we open one its siblings may be different in we are opening it from a Reading List. I am not sure that Tags should keep the reading order because their purpose is abstract, so their behaviour will be opening the comics from theirs container folders.
2021-05-27 18:35:08 +02:00
Luis Ángel San Martín
b8ad99fcaa Exract struct to reuse it 2021-04-30 09:52:31 +02:00
Igor Kushnir
21c3bda5d4 YACReaderFlowGL: initialize data member texture pointers
Moving the initialization of defaultTexture out of the member
initializer list gets rid of a GCC's -Wreorder warning.

Initialize other texture pointers to improve safety and consistency.
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
Luis Ángel San Martín
93596a4972 Restore needed lock 2021-02-08 09:02:19 +01:00
Luis Ángel San Martín
4c93c70de6 Use the right mutex when the queue is modified 2021-02-08 08:32:42 +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
3ab05c6777 Add a new boolean field for tagging comics as manga 2021-01-16 14:23:59 +01:00
Luis Ángel San Martín
c3b0780e03 Remove unused constant 2021-01-14 11:37:37 +01:00
Luis Ángel San Martín
fa5ce25425 Add concurrent queue based on lambdas 2021-01-14 09:03:17 +01:00
smahot
f6bed8590f Support for third party qt image plugins 2020-09-30 19:01:12 +02:00
Luis Ángel San Martín
948ed595e7 Bump version number to 9.7.1 2020-09-12 12:02:55 +02:00
Luis Ángel San Martín
c490b70b68 Move declaration to the viewer group 2020-09-07 18:13:06 +02:00
Luis Ángel San Martín
bb09be3d6a Bump version number 2020-09-03 18:05:05 +02:00
Luis Ángel San Martín
802e0d32ce Fix trying to scale images on null images 2020-09-03 18:00:29 +02:00
Felix Kauselmann
5bb6ab276a Reader: Add option to show covers as single pages in double page mode 2020-09-03 15:32:45 +02:00
Felix Kauselmann
232181eef7 Reader: Add option to stop enlarging images in fit to width and height 2020-09-02 09:27:53 +02:00
Luis Ángel San Martín
5f0889f332 Format 2020-08-31 16:19:42 +02:00
Luis Ángel San Martín
a2b4b88801 Format 2020-08-31 16:04:26 +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
b9acd13120
Fix code format errors due to changes in default coding style. (#150) 2020-07-24 21:17:49 +02:00
Luis Ángel San Martín
092611f0cd Send read status for imported comics 2020-05-09 22:19:00 +02:00
Jeremy Douglass
15c126fda5
Enable unarr 7z support. Closes #113 (#115)
* Enable unarr 7z support. Closes #113
2020-02-12 08:38:03 +01:00
Luis Ángel San Martín
f65395c11d Bump version number 2019-09-28 10:15:17 +02:00
Luis Ángel San Martín
d49c8895ff Bump version number 2019-09-27 18:33:08 +02:00
Luis Ángel San Martín
0b83764734
Revert "Thread ping pong" 2019-09-24 12:00:21 +02:00
Luis Ángel San Martín
7ed19ddd78 Fix scope
GitKraken has some serious issues when resolving conflicts
2019-09-24 09:17:39 +02:00
Felix Kauselmann
cc71f419cc Revert "Backout changeset c42e71e42d7968ddb6c63fd39011669503b9122c"
This reverts commit 040664d3ba.
2019-09-24 08:12:38 +02:00
Luis Ángel San Martín
8603b8ca14 Get the latest version number from the code in master 2019-09-22 12:27:51 +02:00
Luis Ángel San Martín
3923da2344 Add new define to remember if we have notified the user about close to tray 2019-09-21 10:42:38 +02:00
Luis Ángel San Martín
80cd4f64f8 Rename setting
We are going to use close to system tray instead of minimize, easier to handle it at a crossplatform level
2019-09-21 10:42:15 +02:00
Felix Kauselmann
e587f59ddb Add support for minimize and start to tray. 2019-09-19 20:22:14 +02:00
Igor Kushnir
82719573b5 Reader: store geometry instead of pos&size in Configuration
Qt documentation recommends calling saveGeometry() in closeEvent().

This commit fixes the following bug on my GNU/Linux with Xfce system:
    1. Move the top of the YACReader window to the top of the screen.
    2. Restart YACReader (exit and run again).
    2. Enter full screen mode.
    4. Restart YACReader.
    5. Exit full screen mode.
At this point YACReader's title bar is hidden beyond the top of the
screen, i.e. the window has moved up.
2019-09-18 18:10:40 +02:00
Luis Ángel San Martín
2649f58f15 Include lastTimeOpened in plain text comic info 2019-09-10 17:16:53 +02:00
Felix Kauselmann
fb2684292b Fix code formatting. 2019-08-24 14:37:25 +02:00
Felix Kauselmann
bcba08d344 OpenGL CoverFlow: Restore antialiasing
We previously had to disable antialiasing because z-buffer
picking did not work with multisampling enabled. Now we
have raytracing, so we can restore it.
2019-08-24 14:37:25 +02:00
Felix Kauselmann
622978b2bd OpenGL coverflow: Replace z-buffer picking with raytracing. 2019-08-24 14:37:25 +02:00
Luis Ángel San Martín
54fcb059b1 Bump version number 2019-08-24 11:11:51 +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
98a6ef5698 Initialize pointer and use less restrictive condition in destructor 2019-06-02 09:37:40 +02:00
Luis Ángel San Martín
5db5fb7e0c Fix crash when closing YACReader with an empty go to flow gl 2019-06-02 09:28:54 +02:00
Luis Ángel San Martín
c06e8c0fc6 Fix YACReaderPageFlowGL texture destruction 2019-06-01 16:13:29 +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
ca34e99ec4
Merge pull request #57 from vedgy/misc-code-fixes
Miscellaneous code fixes
2019-05-30 18:24:53 +02: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
Felix Kauselmann
caca3191f9 Flow: Remove glu dependency 2019-05-06 07:38:33 +02:00
Felix Kauselmann
d9d93c6481 gl flow: clean up includes 2019-05-05 11:17:45 +02:00
Felix Kauselmann
7bd04ca7d5 remove legacy flow implementation
We no longer support builds using the legacy flow.
2019-05-05 09:39:07 +02:00
Luis Ángel San Martín
14f1609ffa
Merge pull request #43 from mytskine/fix-gcc8-warnings-develop
Fix gcc8 warnings
2019-04-19 16:56:56 +02:00
François Gannaz
88f668d663 bugfix: 'switch case' for OpenVG had no 'break' 2019-04-03 20:44:57 +00:00
François Gannaz
b2f44a939e fix misleading indentation of YACReaderFlowGL::remove 2019-04-01 11:25:16 +02:00
François Gannaz
f87e113f89 fix misleading indentation of YACReaderFlowGL::setCurrentIndex 2019-04-01 11:25:16 +02:00
François Gannaz
472e9f9832 reorder initialization of YACReaderFlowGL 2019-04-01 11:25:16 +02:00
François Gannaz
9ace47ccc0 explicit parenthesis in complex comparison 2019-04-01 11:23:33 +02:00
François Gannaz
8879e7abc5 Initialize parent class 2019-04-01 11:23:33 +02:00
François Gannaz
4f7f760960 fix misleading indentation of ComicDB::toTXT 2019-04-01 11:23:33 +02:00
François Gannaz
7b9502bd97 fix misleading indentation of PictureFlow::showSlide 2019-04-01 11:23:33 +02:00
François Gannaz
fae244b4e3 typecast comparison in PictureFlow::showSlide 2019-04-01 11:23:33 +02:00
François Gannaz
e084bdd447 cases missing in 'switch' in PictureFlow 2019-04-01 11:23:33 +02:00
François Gannaz
0c02564fc5 cases missing in 'switch' in PictureFlow 2019-04-01 11:23:33 +02:00
François Gannaz
f012a6d30e reorder initialization of PictureFlowState 2019-04-01 11:23:33 +02:00
François Gannaz
0e0d707faf reorder initialization of Comic::Comic 2019-04-01 09:08:45 +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
aba45b3011 Keep track of erros while opening a comic
This way we can query if an error ocurred opening a comic.
2018-04-28 17:55:48 +02:00
Luis Ángel San Martín
3cb6e2cd85 Check bookmarks nullity and return in Comic before updating the bookmark image. 2018-04-25 22:16:20 +02:00
Luis Ángel San Martín
932910d0a9 Fix memory leak, comics need to be in the right thread before deleting them. 2018-04-24 21:01:38 +02:00
Luis Ángel San Martín
040664d3ba Backout changeset c42e71e42d7968ddb6c63fd39011669503b9122c 2018-04-24 20:53:48 +02:00
Luis Ángel San Martín
b41884d5db Merge 2018-04-14 10:24:19 +02:00
Luis Ángel San Martín
e78de4da52 Merged in selmf/yacreader/9.0+ (pull request #69)
9.0+

Approved-by: Luis ?ngel San Mart?n <luisangelsm@gmail.com>
2018-04-14 08:16:07 +00:00
Luis Ángel San Martín
e5133c9765 merge develop 2018-03-25 13:16:27 +02:00
Luis Ángel San Martín
53b19ffecd Fix ComicDB::getTitleOrFileName() 2018-03-25 11:26:07 +02:00
Luis Ángel San Martín
fd4e2ebcb0 Bump version number to 9.5.0. 2018-03-12 21:43:42 +01:00
Luis Ángel San Martín
69395398e1 Partial support for storing the cover information in the DB. Work in progress. 2018-03-11 14:43:07 +01:00
Luis Ángel San Martín
aca67f2b2a merged - develop 2018-03-03 23:36:29 +01:00
Anon789
4f779f7e22 yacreaderlibrary_ru.ts
Minor corrections in Russian translation.
2018-02-24 18:15:09 +00:00
Felix Kauselmann
cc72d30f5b Remove thread pingpong 2018-02-20 11:16:47 +01:00
Felix Kauselmann
2cbbf8d433 Headless server: simplify system config logger 2018-01-28 13:32:56 +01:00
Luis Ángel San Martín
e8c6f60c13 Merge 2017-11-26 07:39:08 +01:00
Felix Kauselmann
a0e3046be7 Fix build for Qt 5.3 2017-11-05 17:56:39 +01:00
Luis Ángel San Martín
02e7caf5c5 Bug fix. Updates through the server didn't update the read field in the DB. 2017-10-20 17:42:25 +02:00
Luis Ángel San Martín
1988bbb58e Make naturalComprare public in case we need to user the int return value instead of a bool. 2017-05-26 17:19:55 +02:00
Luis Ángel San Martín
6a6f983115 Merge 2017-05-25 18:04:29 +02:00
Luis Ángel San Martín
241f789727 Added enum that defines the UI themes supported by YACReaderLibrary. 2017-04-24 21:49:21 +02:00
Luis Ángel San Martín
1459ebb261 Fixed path encoding used for opening PDF files with pdfium. 2017-03-28 22:18:07 +02:00
Luis Ángel San Martín
a789d192d1 Added lastTimeOpened as a new property to ComicDB. 2017-03-28 18:38:05 +02:00
Luis Ángel San Martín
dfb6082294 merged 2017-02-18 08:26:53 +01:00
Luis Ángel San Martín
cfb0330026 Fixed compilation problems in OSX after pdf refactoring merge. 2017-01-13 18:59:26 +01:00
Felix Kauselmann
595ceecb62 Add cleanup function to mac pdf image buffer 2016-11-22 18:23:40 +01:00
Felix Kauselmann
46d06f441a merge current develop branch 2016-11-06 16:01:29 +01:00
Felix Kauselmann
464a3b6649 Add no_pdf build option 2016-10-21 22:21:32 +02:00
Felix Kauselmann
36ef664d65 Remove leftover profiling code 2016-10-18 01:47:29 +02:00
Felix Kauselmann
63d261eaf0 Set higher jpg quality for better pdf results 2016-10-18 01:36:29 +02:00
Felix Kauselmann
c74934c822 Add support for pdfium 2016-10-18 00:48:56 +02:00
Felix Kauselmann
98bccee00d Move pdf related header stuff to pdf_comic.h (and fix indentations in comic.h) 2016-10-17 22:40:09 +02:00
Felix Kauselmann
dbada0bd3d Remove some dublicate code from PDFComic::renderPage 2016-10-17 22:27:36 +02:00
Felix Kauselmann
99584c3ba7 Refactoring: more mixed indentation and curly braces 2016-10-17 22:19:28 +02:00
Felix Kauselmann
2edfe534bd Refactoring: fix mixed indentation and add curly braces in comic.cpp 2016-10-17 22:01:23 +02:00
Luis Ángel San Martín
edbb642cee merged develop 2016-06-16 19:23:36 +02:00
Luis Ángel San Martín
859c307324 bump version number to 8.6.0 2016-05-21 21:46:24 +02:00
Luis Ángel San Martín
71ba1de373 prevent crash is something goes wrong processing a PDF in OSX 2016-04-26 16:17:54 +02:00
Luis Ángel San Martín
581592909d merged develop 2016-04-19 23:19:39 +02:00
Luis Ángel San Martín
6a06217f0a Save the width of comic info view in the GridView. 2016-04-19 21:56:05 +02:00
Luis Ángel San Martín
0486e5eb5f Added an icon for the show info toolbar action and a setting for remembering its configuration. 2016-04-19 10:48:48 +02:00
Luis Ángel San Martín
64b77586fc Implemented logic for comic info interactive items (read, fav, rating) 2016-04-18 23:21:54 +02:00
Luis Ángel San Martín
cd07135af2 Updated comic info for writing read and rating properties in QML. 2016-04-13 18:12:33 +02:00
Luis Ángel San Martín
ad315b0d60 Updated comic db classes so they can be used in QML. 2016-04-12 22:06:19 +02:00
Luis Ángel San Martín
2149af25b1 Added copy constructors and operator= to folder and comicdb, LibraryItem has to be a QObject, and QObject disables copy. 2016-04-11 19:25:33 +02:00
Luis Ángel San Martín
1d7319dcd8 Make ComicInfo a QObject, so it can be used in QML code. 2016-04-10 20:05:27 +02:00
Luis Ángel San Martín
c82ac5d63e Added new type of ComicsViewStatus 2016-03-26 23:12:11 +01:00
Luis Ángel San Martín
4b8462459a fixed compilation warnings in YACReaderLibrary.pro, at least using vc++ compiler 2016-03-26 11:31:25 +01:00
Luis Ángel San Martín
011176bebb merged master 2016-03-25 17:15:14 +01:00
Luis Ángel San Martín
8179092d56 added a border to selected/mouseHover elements in the grid view 2016-03-25 11:30:31 +01:00
Luis Ángel San Martín
e23f6b0bc3 store the hash of the first comic in a folder, this is more useful than storing the id 2016-01-24 19:14:16 +01:00
Luis Ángel San Martín
bac7fe1351 updated Folder class 2016-01-24 17:41:26 +01:00
Luis Ángel San Martín
865026e46f added new fields to Folder class 2016-01-24 11:36:12 +01:00
Luis Ángel San Martín
ac4772812a merged 2016-01-13 19:31:57 +01:00
Luis Ángel San Martín
799cb10c02 fixed greedy regular expresions in HttpVersionChecker 2016-01-06 10:55:25 +01:00
Luis Ángel San Martín
16a69a0d3a Added support for using the selected comic cover as background in the grid view. TODO: implement the UI so the user can change the behaviour 2016-01-02 10:50:03 +01:00
Luis Ángel San Martín
9a62cd4a72 added a QStyledItemDelegate to the list QListView in EmptyFolderWidget to center aling folders' names 2016-01-01 13:11:31 +01:00
Luis Ángel San Martín
1003fa0b26 erged default 2015-12-12 13:21:51 +01:00
Luis Ángel San Martín
51865ec1bc merged 2015-12-12 13:20:25 +01:00
Luis Ángel San Martín
e1de588e40 fixed compilation of YACReaderLibrary and YACReaderLibraryServer, removing all the dependecies on QtWidgets from non gui code 2015-12-12 12:10:37 +01:00
Luis Ángel San Martín
c1e14aea1f separated global helpers depending on gui to a new source code file 2015-12-12 12:09:47 +01:00
Luis Ángel San Martín
92b0c1d9f4 added .pro file for the headless version of YACReader and a specific main file for the project 2015-12-12 11:25:38 +01:00
Luis Ángel San Martín
cf827018b9 Fixed compilation of YACReader in OSX with Qt5.5 2015-12-10 16:39:30 +01:00
Luis Ángel San Martín
de59cbd9e3 Added support for showing the first cover of a folder as the background image in the grid view. The setting strings have been added too, but by now they are not written, only the defaults are read when the folder's content is loaded. 2015-12-07 21:28:36 +01:00
Luis Ángel San Martín
d151ccf9e4 added more options for sorting pages 2015-11-28 17:05:24 +01:00
Luis Ángel San Martín
7b271a1c03 ribons moved sightly down 2015-11-28 11:57:16 +01:00
Luis Ángel San Martín
1ca72f8fcb Added a custom/heuristic pages sorting method for fixing bad named double page files, f.e: page-18.png, page-1920.jpg, page-21.jpg 2015-11-28 11:28:30 +01:00
Luis Ángel San Martín
48466617e6 updated natural sorting algorithm for using QCollator 2015-11-27 21:33:56 +01:00
Luis Ángel San Martín
e6064b9126 Added call to missing glClearColor method in flow classes, this was causing render issues in some platforms. 2015-11-14 17:16:47 +01:00
Luis Ángel San Martín
581608b3ab added covers size slider to grid view 2015-08-20 17:59:52 +02:00
Luis Ángel San Martín
3ed6d78f75 fixed compilation for Qt5.5 in OSX 2015-07-18 10:54:14 +02:00