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.
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
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
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.
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
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.
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.
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.