Commit Graph

39686 Commits

Author SHA1 Message Date
un-pogaz d6400eb41d ... 2026-01-18 13:09:43 +01:00
Kovid Goyal 9f0bda5522 Release GIL while parsing .mo file 2026-01-18 16:58:14 +05:30
Kovid Goyal 9146384bf1 Switch to the GIL free translator
Allows Qt code to use the translations without acquiring the GIL.
Fixes deadlocks when python code holding the GIL calls Qt code which
tries to use a translation which calls the python translator which tries
to acquire the GIL, causing the deadlock.

QTranslator::translate() is supposed to be thread safe which the old
python based translator was not. The new one is.

Fixes #2138516 [Private bug](https://bugs.launchpad.net/calibre/+bug/2138516)
2026-01-18 15:22:17 +05:30
Kovid Goyal cb14db0ce8 API function to install the new Trnaslator as the Qt translator 2026-01-18 14:58:55 +05:30
Kovid Goyal d140a30fbd A hook point for Qt translations 2026-01-18 14:37:13 +05:30
Kovid Goyal 955175b68c ... 2026-01-18 14:11:35 +05:30
Kovid Goyal 11b0ef7054 Get gettext() and ngettext() working 2026-01-18 14:10:01 +05:30
Kovid Goyal 95af9b853b Add info() and charset() methods to Translator 2026-01-18 11:17:10 +05:30
Kovid Goyal 8cfa3c0b3f Also release GIL while load QImage in utils.img 2026-01-18 10:16:52 +05:30
Kovid Goyal d55ffcf46a Start work on replacing python gettext with native code version
Needed to use translations for both python and Qt without invoking the
GIL when used from Qt.
2026-01-18 10:13:33 +05:30
Kovid Goyal 4eb9d9eca2 Explicitly release GIL while loading QImage in thumbnail renderer thread 2026-01-17 11:16:44 +05:30
Kovid Goyal 22916f8f22 Release the GIL while calculating the dominant color 2026-01-17 10:38:00 +05:30
Kovid Goyal 1e4c541357 Name the IPC Server thread 2026-01-17 09:57:29 +05:30
Kovid Goyal 5364d6fcc9 Name the metadata backup thread 2026-01-17 09:39:49 +05:30
Kovid Goyal 370fb3a0cd Be more vigorous about deleting Qt objects before exit 2026-01-17 09:19:31 +05:30
Kovid Goyal 443063592b Delete QApplication explicitly
Prevents some object lifetime crashes during shutdown
2026-01-17 09:07:38 +05:30
Kovid Goyal ed07c9fd04 Make group_name usage explicit 2026-01-17 08:29:55 +05:30
un-pogaz 37faeb0737 Bookshelf: avoid to end a case with a divider
and move it at the start of the next
2026-01-16 19:09:53 +01:00
Kovid Goyal 9384b8d75c Use recursive locks for the cover caches
Performance hit of a few nanoseconds per lock operation, however
eliminates one source of deadlocks.
2026-01-16 20:07:07 +05:30
Kovid Goyal 65823b271f ... 2026-01-16 20:05:03 +05:30
Kovid Goyal 6db354cd30 Merge branch 'emblem-init_template' of https://github.com/un-pogaz/calibre 2026-01-16 19:30:04 +05:30
Kovid Goyal e845163145 Preferences->Look & feel allow right clicking on the sections in the list to restore defaults for just that section 2026-01-16 19:28:52 +05:30
un-pogaz 7e926f2e51 call init_template() in render_emblem too 2026-01-16 14:52:01 +01:00
Kovid Goyal 25e034a8c4 Fix regression causing failure when second line template is None 2026-01-16 19:17:29 +05:30
Kovid Goyal ee4d8d7127 ... 2026-01-16 17:23:52 +05:30
Kovid Goyal a5c9746696 Bump beta version 2026-01-16 12:58:22 +05:30
Kovid Goyal 46b05794a8 Automated upgrade of source code to python 3.14 2026-01-16 12:20:27 +05:30
Kovid Goyal 75fd04c97b Upgrade type annotations for newer python 2026-01-16 11:28:53 +05:30
Kovid Goyal a8bf77546e Replace use of deprecated datetime.timezone.utc 2026-01-16 11:19:53 +05:30
Kovid Goyal cbf93dc016 E-book viewer: Allow typing in a page number to go to instead of forcing the user to scroll through existing page numbers 2026-01-16 10:55:12 +05:30
Kovid Goyal 1d2a0c8050 ... 2026-01-16 10:40:37 +05:30
Kovid Goyal 106c33ee02 Cleanup previous PR 2026-01-16 10:38:23 +05:30
Kovid Goyal f9af8911ad Merge branch 'master' of https://github.com/xyzzy-foo/calibre 2026-01-16 10:31:57 +05:30
Kovid Goyal 33b52f598f ... 2026-01-16 10:30:50 +05:30
Kovid Goyal 579b151169 Use with for QPainter 2026-01-16 09:55:31 +05:30
Kovid Goyal 04028608f1 Merge branch 'fix-painter-crash' of https://github.com/un-pogaz/calibre 2026-01-16 09:26:13 +05:30
un-pogaz f7b25d1083 Bookshelf: fix template not updated if the previous value was empty 2026-01-15 22:19:02 +01:00
xyzzy-foo abc81de373 OPF2: Backport the fallback process for reading Open Manga Format (OMF) cover images to OPF2
The OMF cover image was not referenced in the KEPUB conversion because the EPUB Input plugin references OPF2 instead of OPF3.
2026-01-16 05:30:35 +09:00
un-pogaz 8e3194a8ce ... 2026-01-15 20:01:15 +01:00
un-pogaz 9043273c21 Bookshelf: add forgotten painter.end() in paintEvent
also revert "Log exception in bookshelf emblem rules instead of raising an error dialog"
commit aa550f6
2026-01-15 19:15:35 +01:00
Kovid Goyal d8f33cf65e Cleanup fetching of preferences from db
Hold the db lock while reading the preference. Only fetch the emblem
rules once rather than once per render.
2026-01-15 22:27:16 +05:30
Kovid Goyal aa550f69cf Log exception in bookshelf emblem rules instead of raising an error dialog 2026-01-15 22:09:39 +05:30
Kovid Goyal 161d465936 Add a tooltip to thumbnail opacity setting 2026-01-15 18:43:59 +05:30
un-pogaz 7a687b2169 Bookshelf: add option for thumbnail opacity 2026-01-15 11:54:53 +01:00
Kovid Goyal 908de6faec Increase yield time to 10ms from 100ms 2026-01-15 14:09:07 +05:30
Kovid Goyal a945a5538e ... 2026-01-15 11:24:18 +05:30
Kovid Goyal 43af11bf87 Make the default bookshelf disk cache size slightly larger
Needed for large screen displays where the shelf height becomes quite
large
2026-01-15 11:22:36 +05:30
Kovid Goyal be1bb45b13 E-book viewer: Change length count algorithm to use the algorithm from the new page count code
I realised that the length numbers will have changed anyway for any book
with an <i> tag. So might as well be consistent for the future.
2026-01-15 10:47:04 +05:30
Kovid Goyal 301e3e0cb1 use the new compression package to import compression codecs from 2026-01-15 07:31:27 +05:30
Kovid Goyal 7213b89643 Page count thread: Yield to main thread to ensure no starvation due to the GIL
We anyway release the GIL when doing I/O to worker thread, but in case
of re-scans there may not be much I/O.
2026-01-15 07:17:26 +05:30