Commit Graph

226 Commits

Author SHA1 Message Date
Felix Kauselmann
22c2431cc5 Render: Remove obsolete debug messages 2021-07-30 08:58:39 +02:00
Felix Kauselmann
abcb4b1f26 GoTo flow: Sync slide and page index in quick navigation mode 2021-07-30 08:58:39 +02:00
Felix Kauselmann
40d4d224be Viewer: Always start GoTo flow on correct page 2021-07-30 08:58:39 +02:00
Felix Kauselmann
df32cf01fb GoTo dialogs: Restrict input values to existing pages 2021-07-30 08:58:39 +02:00
Felix Kauselmann
54b9952253 YACReader: Show error when opening nonexistent open recent entry 2021-07-30 08:58:39 +02:00
Felix Kauselmann
5b66153390 YACReader/viewer: Convert a bunch of loosely related signals to new syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
5dbbaad73b GoTo flows: Untangle and refactor goTo signal to new 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
3683ace654 Remove message box used during development 2021-05-29 10:34:42 +02:00
Luis Ángel San Martín
4fc60c72aa Update YACReaderLibrary <-> YACReader communication to support reading lists 2021-05-27 18:56:31 +02:00
Ruoh-Shoei LIN
dbe1da58dc Update Simplified Chinese GUI translation for YACReader &
YACReaderLibrary
2021-05-09 11:55:52 +02:00
Igor Kushnir
497894c5bf Allow to configure Fit to page action shortcut in the UI 2021-03-11 11:14:24 +02: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
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
Felix Kauselmann
e5526de0af
Render: Protect against race condition in setNumPages (#220)
* Render: Use sendPostedEvents to force processing of queued events when removing old comic objects
2021-03-04 16:45:52 +01:00
Igor Kushnir
6f182b2bb3 Extract CONFIG += c++11 into common config.pri 2021-02-18 19:49:43 +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
dee557c518 Use a constant reference for passing QKeySequence to moveAction 2021-01-17 11:11:25 +01:00
Stefan Malewski
08ce8c3c65 Fixed move action shortcuts 2021-01-17 11:06:45 +01:00
Stefan Malewski
c73f28cca1 KeySequence passed by reference 2021-01-17 11:06:45 +01:00
Stefan Malewski
fccf9ab0af Fixed shortcuts for move actions 2021-01-17 11:06:45 +01:00
Luis Ángel San Martín
a911a4fc53 Update action names in macos menus 2021-01-16 18:45:47 +01:00
Luis Ángel San Martín
2a3f7668ba Rename method 2021-01-16 18:27:16 +01:00
Luis Ángel San Martín
d07de8fb2e Rename prev/next actions to reflect its positional behaviour 2021-01-16 14:59:37 +01:00
Luis Ángel San Martín
c7cf012d51 Remove commented code 2021-01-16 14:34:28 +01:00
Luis Ángel San Martín
611d4c5e26 Add support for detecting manga issues in YACReader
When an issues is open from YACReaderLibrary we can check if it is a manga an update the UI to enable manga reading.

This also fixes going previous/next from the ui/shortcuts
2021-01-16 14:29:00 +01:00
Heimen Stoffels
ccf1e4cb56 Updated Dutch translation 2020-10-01 11:56:35 +02:00
Luis Ángel San Martín
4739376f5b Use new methods 2020-09-07 18:13:55 +02:00
Luis Ángel San Martín
6738827798 Add methods to access ENLARGE_IMAGES setting 2020-09-07 18:13:43 +02:00
Felix Kauselmann
acce89ef78
Update viewer.cpp 2020-09-07 08:54:23 +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
a2b4b88801 Format 2020-08-31 16:04:26 +02:00
Igor Kushnir
0da59285cf Reader: fix QTimer-related memory leaks 2020-08-31 15:44:50 +02:00
Igor Kushnir
b0082101d3 Reader: don't forget comic info visibility
The timer used to time out and invoke Viewer::informationSwitch() twice
before getting destroyed. This caused the following bug:
    1. Press 'I' to Show Info in YACReader.
    2. Restart YACReader (exit and run again). Info is visible.
    3. Restart YACReader one more time. Info is hidden.

Apparently, when informationSwitch() was called a second time soon after
the first one, informationLabel didn't hide for some reason, but the
wrong value (false) was stored at the SHOW_INFO key in Configuration.
2020-08-31 15:44:50 +02:00
Felix Kauselmann
fc8c1080da Add a message handler
This ensures that Qt debug messages actually end up in our logfiles,
even if we didn't use QsLog to create them.
2020-08-20 17:41:56 +02:00
Felix Kauselmann
56e6f8fdcc Allow setting YACReader loglevel from console 2020-08-20 17:41:56 +02:00
Felix Kauselmann
ac4d2f4804 Fix QsLog integration in reader too. 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
Luis Ángel San Martín
eea96f6fa2 Improve file association in YACReader Info.plist 2019-10-20 09:19:49 +02:00
Luis Ángel San Martín
1f8be886ec Add new action to create a new instance of the viewer in macos 2019-09-28 16:55:28 +02: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
Luis Ángel San Martín
0b83764734
Revert "Thread ping pong" 2019-09-24 12:00:21 +02:00
Felix Kauselmann
cc71f419cc Revert "Backout changeset c42e71e42d7968ddb6c63fd39011669503b9122c"
This reverts commit 040664d3ba.
2019-09-24 08:12:38 +02:00
Igor Kushnir
6efc31682c Reader: eliminate duplicate calls to GoToFlow::preload()
GoToFlow::setNumSlides() is called each time a comic is opened. So when
e.g. three comics were opened one after another without restarting
YACReader, each of the PictureFlow::centerIndexChanged* signals was
connected to GoToFlow::preload three times, which multiplied the number
of calls to preload() accordingly.

During my testing PictureFlow::centerIndexChanged* signals were never
emitted before the first call to GoToFlow::setNumSlides(), so connecting
in GoToFlow::GoToFlow() should not cause extra calls to preload().
2019-09-18 18:12:03 +02:00
Igor Kushnir
28b8fca729 Reader: make PageLoader::working atomic to fix a data race
This data member is modified in PageLoader's own thread and accessed
without locking from an external thread in the public busy() function.

Reorder setting working and img in PageLoader::run() to avoid a data
race in PageLoader::result() called from GoToFlow::updateImageData().
2019-09-18 18:12:03 +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
Igor Kushnir
eb9075c917 Reader: remove unused code from Configuration 2019-09-18 18:10:40 +02:00
Igor Kushnir
39ab598363 Reader: clean unused code up
closeEvent is accepted by default, so this commit does not change the
application behavior. But Qt documentation recommends not relying on the
default value as subclasses may choose to clear it in their constructor.
2019-09-18 18:10:40 +02:00
Igor Kushnir
8820c8769b Reader: add support for horizontal mouse wheel
Without this commit the horizontal wheel on a two-wheel mouse acts the
same as the vertical wheel in YACReader.

horizontalScroller is used analogously to verticalScroller in
Viewer::scrollTo(). So I made the horizontal wheel work analogously to
the vertical wheel except for moving to the next or previous page.
2019-09-18 15:32:35 +02:00
Luis Ángel San Martín
15277d00b7 README.txt has been renamed to README.md
this fixes installing YACReader using qmake -install
2019-09-16 23:46:26 +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
607b7b4d6f Remove QMAKE_MAC_SDK from all projects 2019-08-24 11:11:50 +02:00
Luis Ángel San Martín
0892d2a022 Fix saving progress in double page mode
If the current page is being displayed we don't change anything, if is it not, we pick the current index page.
2019-08-21 18:46:10 +02:00
Luis Ángel San Martín
0ab94181cc Use exiting variable instead of request the image several times 2019-06-01 16:12:08 +02:00
Luis Ángel San Martín
0503a83a86 Use device pixel ratio when using intermediate images in lens 2019-06-01 16:12:08 +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
9140d66693 Use nullptr 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
bb334cfd50 Use auto to avoid duplicating the type name 2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
923ad40057 Use nullptr instead of 0 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
d1b1965fc0
Merge pull request #59 from vedgy/eliminate-SlideInitializer
Reader: eliminate SlideInitializer class
2019-05-30 18:29:02 +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
bb964c8566 Reader: eliminate SlideInitializer class
GoToFlow shared its YACReaderFlow flow object with SlideInitializer
objects it created. GoToFlow modified the flow object in the main thread
and SlideInitializer modified the flow object in its own thread without
any thread synchronization. The only reason this usually worked was the
timing: SlideInitializer finished its work before the next time GoToFlow
heavily accessed the flow object. This was a data race and thus
undefined behavior.

Additionally, this commit eliminates a memory leak:
a new SlideInitializer object was constructed each time a comic was
opened in YACReader. These objects were never destroyed.

SlideInitializer called PictureFlow::triggerRender() from its own
thread. This function restarted triggerTimer, which QTimer's API forbids
doing from another thread. This commit eliminates the following errors
from YACReader's standard output:
    QObject::killTimer: Timers cannot be stopped from another thread
    QObject::startTimer: Timers cannot be started from another thread

Without this fix YACReader on GNU/Linux often uses an entire CPU core
from launch till exit if hardware acceleration is disabled (#56).

The data race could alternatively be fixed by adding thread
synchronization code into most GoToFlow member functions. But the code
in SlideInitializer::run() is executed only once per opened comic; it is
not slow enough to justify creating a dedicated thread and suffer the
overhead of thread synchronization while the comic is being read.
I have tested several 550 pages long 1 GB comic books.
SlideInitializer::run() took up to 25 milliseconds in the worst case,
but usually 2-4 times less. For smaller 30-page comics it usually takes
less than a millisecond.

Even though mutexGoToFlow was locked in SlideInitializer::run(), there
is no need to lock it in the code moved to GoToFlow::setNumSlides():
this function is called in the main thread like all the other GoToFlow's
member functions that access the flow object. PageLoader does not have
access to the flow object.
2019-05-29 10:56:43 +03:00
Igor Kushnir
12aabf7960 Reader: fix thread safety bugs in PageLoader 2019-05-24 14:53:59 +03:00
Felix Kauselmann
caca3191f9 Flow: Remove glu dependency 2019-05-06 07:38:33 +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
35bb3b553f bug: 'else' without braces but several lines indented (#41)
* bug: 'else' without braces but several lines indented

* always set previousIndex in Render::updateBuffer()

As discussed in #41, the previous index was meant to be
updated in every case, but the faulty indentation
suggested another behavior.
2019-04-03 20:43:27 +00:00
François Gannaz
5ad0e293ac typecast comparison from unsigned to int 2019-04-01 11:23:33 +02:00
François Gannaz
f9d6667461 typecast comparison in Render::nextPage 2019-04-01 09:27:09 +02:00
François Gannaz
9dbfabc05f fix ambigous 'else' in Render::load 2019-04-01 09:25:12 +02:00
François Gannaz
560bcf7f32 reorder initialization of Render 2019-04-01 09:22:46 +02:00
François Gannaz
a8677553b7 reorder initialization of PageRender 2019-04-01 09:18:49 +02:00
François Gannaz
06a36bfa40 reorder initialization of Viewer::Viewer 2019-04-01 09:16:09 +02:00
Luis Ángel San Martín
9321d864db Fixed sending read progress. 2018-10-06 11:12:44 +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
d5a11fb16b Add .gitattributes rules for text and binary handling 2018-07-30 15:04:04 +02:00
Felix Kauselmann
1fbf1195b9 Fix YACReader build for Qt <= 5.7 2018-07-01 14:39:46 +02:00
Luis Ángel San Martín
6538d418c7 Update translations. 2018-06-16 08:28:50 +02:00
toto
0b552bc726 Translate
French translation
2018-06-14 22:35:34 +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
9cc4f65fc8 Use older api currentSecsSinceEpoch was introduced in Qt 5.8 2018-05-28 21:18:11 +02:00
Felix Kauselmann
0cc6b3bcf7 SendComic: Connect finished signal to deleteLater slot BEFORE the finished
signal is emitted so it is actually processed and we don't get dangling pointers.

Use modern signal slot syntax so that the compiler and source check tools can
verify we actually fixed the problem.
2018-05-26 12:43:03 +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
c97bc6ef88 Fix determining if we are in double page or not. 2018-05-20 17:39:08 +02:00
Luis Ángel San Martín
c9f703b6f7 Revert "Fixed wrong index asigned to current page from the viewer"
This reverts commit 26fdb5a303.
2018-05-20 15:19:48 +02:00
Luis Ángel San Martín
82cfdfdf30 YACReader should be dummy about has been opened.
It should only send back information, hasBeenOpened will be set in YACReaderLibrary depending on various factors.
2018-05-20 14:43:19 +02:00
Luis Ángel San Martín
26fdb5a303 Fixed wrong index asigned to current page from the viewer 2018-05-20 14:40:07 +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
Felix Kauselmann
6313df5407 Make BINDIR, DATADIR and LIBDIR fully configurable 2018-03-11 09:40:30 +01:00
Felix Kauselmann
e1af8fa35e Merge develop 2018-03-10 11:49:29 +01:00
Luis Ángel San Martín
aca67f2b2a merged - develop 2018-03-03 23:36:29 +01:00
Luis Ángel San Martín
2f6c968302 Merged in Anon789/yacreader-4/Anon789/yacreader_ruts-correcting-errors-in-wor-1519495902252 (pull request #66)
yacreader_ru.ts

Approved-by: Luis ?ngel San Mart?n <luisangelsm@gmail.com>
2018-03-03 14:53:02 +00:00
Anon789
7860a9b51f yacreader_ru.ts edited online with Bitbucket 2018-02-26 12:38:46 +00:00
Anon789
cbd5c0acc5 Translation into Russian is completed by 100% In the future there will be only correction of errors, inaccuracies of translation and other improvements in appearance. 2018-02-25 15:59:46 +00:00
Anon789
dd381df7b7 yacreader_ru.ts
Correcting errors in words and their meanings. Update the Russian language. Now look better.
2018-02-24 18:11:53 +00:00
Felix Kauselmann
cc72d30f5b Remove thread pingpong 2018-02-20 11:16:47 +01:00
Felix Kauselmann
251dede93d Remove obsolete QGLWidget based cover flow 2018-02-19 14:36:58 +01:00
Felix Kauselmann
09c8125f87 Merge default branch 2018-02-18 17:17:14 +01:00
Felix Kauselmann
fc454a81a3 Fix builds with CONFIG+=no_opengl 2018-02-18 15:02:51 +01:00
Luis Ángel San Martín
2a136e3ea3 Merge - 9.0.0 release 2018-02-18 10:35:24 +01:00
Felix Kauselmann
afab73cbc6 YACReader: Port commandline to QCommandLineParser 2018-02-16 15:31:32 +01:00
Felix Kauselmann
f9ed9b19b5 Code cleanup for main.cpp files
Remove ancient OS detection code, unneeded includes and ugly workarounds.
2018-02-12 22:30:19 +01:00
Felix Kauselmann
2cbbf8d433 Headless server: simplify system config logger 2018-01-28 13:32:56 +01:00
apollo2k4
f2a356fc70 Update russian translation. Need to subtract and to bring the terminology to a common denominator 2018-01-08 16:32:56 +00:00
Luis Ángel San Martín
e8c6f60c13 Merge 2017-11-26 07:39:08 +01:00
Luis Ángel San Martín
d5f167b670 Don't set the window icon, let windows use the app icon. 2017-11-20 21:37:26 +01:00
Luis Ángel San Martín
31ba1275d3 Update app icons for YACReader and YACReaderLibrary in Windows. 2017-11-20 19:43:48 +01:00
Felix Kauselmann
6ccc78558f Remove unneeded es.qm files. 2017-11-06 13:11:33 +01:00
Felix Kauselmann
2c914d6579 Support Haiku OS specific libs and compile flags in the build system. 2017-11-03 08:15:46 +01:00
Felix Kauselmann
6a1ba45a4d Add 64 bit builddir support for YACReaderLibraryServer 2017-10-22 14:21:35 +02:00
Felix Kauselmann
af59672204 Buildsystem: add folders for 64bit build and improve dependencies detection. 2017-10-21 21:49:00 +02:00
Luis Ángel San Martín
9dc4c7a753 Updated translation resources files. 2017-09-29 11:51:04 +02:00
Felix Kauselmann
958003f52f Fix problems with missing safety checks in Render::fillBuffer and pdfcomic 2017-09-27 22:00:00 +02:00
Luis Ángel San Martín
f149f314e0 Merge 2017-08-26 16:54:10 +02:00
Luis Ángel San Martín
d6898e9a4e Fixed data base info retrieving through DBHelper, value(QString) should never be used because it is really slow. All items sorting should be done at db level or using std::sort. 2017-08-26 16:16:11 +02:00