Commit graph

2749 commits

Author SHA1 Message Date
Volker Krause 2fa738d949 Unify usage of WITH_K7ZIP
We should either check its value or its definedness, not mix both.
Standardize on the former.

Fixes the build without LZMA support in KArchive.
2024-04-27 15:19:03 +02:00
bob sayshilol 0bc8c76c3c Fix strikethrough rendering in markdown converter
Previously the `<del>` tag that Discount emits would be removed by Qt
since it's not in the subset of HTML that it understands. It does know
about `<s>` though, so replace `<del>` with `<s>` to render strikethroughs
correctly.

Note that I couldn't get Okular to build locally (PEBCAK issue) so I split out this file to debug it. I've tested against http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip and ff866f73d4/tests/data and the only difference is that trailing whitespace is now trimmed from the end of a line:
```diff
8c8
< <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes:</p>
---
> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes: </p>
```
A quick search suggests this isn't a problem though https://stackoverflow.com/a/27026403:
> Within block tags (i.e. `<p>`, `<h1>`, `<div>`, ...) spaces as well as line breaks at the beginning or end of the tags should always be ignored (i.e. `<p>test</p>` should look the same as `<p> test </p>`).

I also tried https://doc.qt.io/qt-5/qtextdocument.html#setMarkdown which solves the strikethrough problem, though there are many visible differences with that approach. Most notably, everything is squashed together and code blocks lose their formatting.
2024-04-22 17:00:02 +00:00
Sune Vuorela 460cf6123e Remove CHM generator; disabled for 4 months 2024-04-20 15:58:58 +00:00
Andras Mantia 4435325e5a Load certificates delayed
Showing a dialog from a Paint event handler is something Qt doesn't like.

BUG: 472356
2024-04-20 13:44:54 +00:00
Albert Astals Cid b4f449a3a4 djvu: Remove support for old djvu library version
The previous commit broke compilation but our CI passes, which
means we don't support such an old version anymore
2024-04-17 01:42:11 +02:00
Albert Astals Cid 0c121c0ff8 remove extra ; 2024-04-17 01:41:44 +02:00
Sune Vuorela 4509b7bc42 Various minor fixes
Mostly derived from cppcheck runs
2024-04-16 15:44:19 +02:00
Sune Vuorela bfc3e46f9c A collection of cppcheck fixes 2024-04-15 19:59:42 +02:00
Nicolas Fella 465b9ff5ce Let poppler pick the font size when signing signature fields
Currently we use the default font sizes for NewSignatureData, which are 10 for fontSize and 20 for leftFontSize

This can be too large for a small signature field, leasing to cut-off text

When passing 0 poppler picks a suitable size depending on the size of the signature field

CCBUG: 443403
2024-04-15 12:24:17 +00:00
Heiko Becker 9c2fb5af53 GIT_SILENT Update Appstream for new release
(cherry picked from commit 21c7411e1d)
2024-04-08 18:04:20 +02:00
Albert Astals Cid 7a5d1a23b0 Properly reset documentHasPassword 2024-04-03 01:43:38 +02:00
Nicolas Fella ea243a2a03 Fix DocumentHasPassword check
A document can be encrypted without requiring a password to open/sign it.

Currently we assume we need a password to sign it for such documents, but
that's not correct.

Instead of checking whether the document is encrypted remember whether
we needed a password for opening.

BUG: 474888
2024-04-02 13:04:54 +02:00
l10n daemon script 2ae6717266 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-28 01:17:06 +00:00
l10n daemon script 081ec7d4ec GIT_SILENT made messages (after extraction) 2024-03-28 00:37:36 +00:00
Sune Vuorela cc45d8c39c fix a cppcheck warning 2024-03-19 07:55:56 +00:00
Heiko Becker aa9ae5b82a GIT_SILENT Update Appstream for new release
(cherry picked from commit bb19076108)
2024-03-15 22:29:10 +01:00
l10n daemon script 6cc91439e1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-09 01:13:56 +00:00
l10n daemon script 3324424891 GIT_SILENT made messages (after extraction) 2024-03-09 00:37:17 +00:00
Sune Vuorela 2fcb5f9f9d Newer clazy: Add a few std::as_const 2024-03-04 16:50:06 +01:00
Sune Vuorela 653465f165 Newer clazy: QList changes 2024-03-04 16:49:55 +01:00
Fushan Wen 677a2467ba Use QStringView more to reduce allocations 2024-02-22 23:20:40 +00:00
Sune Vuorela 8a6d86ab19 Better user strings for signature settings
CCBUG: 481262
2024-02-19 21:39:02 +00:00
l10n daemon script df3bfa005d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-18 01:13:47 +00:00
Heiko Becker 3f042a7136 GIT_SILENT Update Appstream for new release
(cherry picked from commit 22481a6a89)
2024-02-16 00:56:02 +01:00
l10n daemon script 9d8e8c90ef SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-14 01:13:45 +00:00
Heiko Becker 4f215109fc GIT_SILENT Update Appstream for new release
(cherry picked from commit f98272f40f)
2024-02-10 00:41:17 +01:00
Sune Vuorela 5870b4e3b9 Remove plucker generator
It is undermaintained, it is hard to find documents for it, no tests,
doesn't look like it has seen any fuzzing test and looks like it trusts
the input is good.
2024-02-08 23:32:11 +00:00
Sune Vuorela 2e008d437c Simplify textentity memory management
After trying to measure the effect of switching TinyTextEntity from a
custom SBO string type to just QString and getting a barely measurable
gain, TinyTextEntity kind of looked like TextEntity, so merge those two.

Also reduce the amount of new/deletes around TextEntities

Implement a string pool for some tiny strings, and various memory optimizations
2024-02-07 14:07:08 +00:00
l10n daemon script 73dc2f4d93 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-04 01:13:00 +00:00
l10n daemon script 87c4cd8876 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-03 01:13:43 +00:00
l10n daemon script d614c09a25 GIT_SILENT made messages (after extraction) 2024-02-03 00:37:23 +00:00
l10n daemon script 882cebf811 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-02 01:12:49 +00:00
Sune Vuorela cac31c3aad DVI: use actual page size 2024-01-26 12:19:28 +00:00
Sune Vuorela a218085bd6 Better fix for crash-in-pdf-generation
Check if abort is requested, rather than the side effects of it.
Also remember to unlock userMutex
2024-01-26 13:09:58 +01:00
Sune Vuorela 77f810f013 Fix crash in pdf generator
There is a theoretical chance that doCloseDocument has been called while
text extraction is running. There has at least been unit test crashes
here. Try guard that case.
2024-01-15 10:28:33 +00:00
Sune Vuorela a0031b4a05 Remove leftover desktop files. The generators is now with json files 2024-01-09 21:57:05 +00:00
Sune Vuorela dc88b5873a Don't put slashes in plugin prefix
It complicates stuff further down the line and we don't gain much for
it, so work with the rest of the stack rather than work around it.

One of the complications is that if bindir contains both plugins and executable, we will have okular and okular/ in the same folder and that doesn't really work.
2024-01-09 14:12:45 +00:00
l10n daemon script 651098cf5a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-08 02:08:32 +00:00
l10n daemon script ee54715d81 GIT_SILENT made messages (after extraction) 2024-01-08 01:35:10 +00:00
l10n daemon script 867f18a700 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-04 02:07:40 +00:00
l10n daemon script a641170dc8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-02 02:03:31 +00:00
Sune Vuorela 6cc8968ee8 Port from deprecated QVariant type 2023-12-21 12:58:31 +00:00
Sune Vuorela 8532d24a73 Port away from deprecated setFontFamily 2023-12-19 12:58:00 +00:00
Sune Vuorela 792425fc77 s/qAsConst/std::as_const/
We now definitely has std::as_const available and Qt has started nagging
about converting to std::as_const.

Implementation is the same for both functions, and qAsConst was a
stop-gap measure until std::as_const was sufficiently available.
2023-12-19 11:46:24 +00:00
Sune Vuorela 5ac1eb0ad6 clazy: make qregularexpression static const 2023-12-18 22:56:22 +00:00
Sune Vuorela a0d40ab0bc Remove Id from json files. Everything complains and ignores 2023-12-18 22:56:22 +00:00
Carl Schwan 8362bd052f Fix compilation of comicbook generator
For Qt6, static libraries need POSITION_INDEPENDENT_CODE to be set.
2023-12-18 22:56:22 +00:00
Sune Vuorela c69e79e67a Do something with text generator. It feels not fully okay, but.. 2023-12-18 22:56:22 +00:00
Sune Vuorela 601e03f973 Fix comicbook build 2023-12-18 22:56:22 +00:00
Sune Vuorela 4865af4b0e Build poppler generator. We still need to take an extra look at the changes in memory managing 2023-12-18 22:56:22 +00:00