Remove pointless null check, we know printDialog isn't null since we create it right before
Create PrintDialog on the stack
We create and destroy it all within one function
This way we get guaranteed cleanup for free
This commit updates the "remove bookmark" actions to use the more
specific "bookmark-remove" icon, rather than the more general
"list-remove" icon or the older "edit-delete-bookmarks" icon which does
not exist in the Breeze icon theme. For compatibility's sake, a fallback
is added to try "edit-delete-bookmarks" if "bookmark-remove" is not
found in the active icon theme.
It also uses a longer but clearer string for the "remove all bokmarks"
context menu item.
Currently there are two tiny icons-only buttons with very similar icons
(which may even be identical in some icon themes). One of them is
checkable, and the other one triggers an immediate action. And there is
lots of unused space to the right of them.
This commit overhauls them in the following way:
- The toggle button becomes a checkbox with visible text, and is
inverted; now when checked, it shows all bookmarks
- The checkbox moves above the view and search field, to communicate
that it affects everything below it
- The button to add a bookmark gets some visible text
This should make the UI much clearer, at the cost of one extra line of
vertical space from the bookmarks list.
Previously, the only ways to add a bookmark were with the menu item or
keyboard shortcut. This commit adds a button at the bottom of the
bookmarks sidebar to do the same thing, which seems like a logical place
for such functionality.
setupViewerActions() was moved to earlier in the setup process to ensure
that m_addBookmark is assigned by the time the bookmarks sidebar is
created, since it gets passed that action in its constructor.
BUG: 357625
FIXED-IN: 21.12
epub_open wants an utf8 in Windows
It probably also wants utf8 in Linux, but the qPrintable already gives
us an utf8 in most of the normal Linux locales, so don't touch that
BUGS: 448274
Turns out some files contain images saved in the xps archive as a directory containing multiple pieces, the first one being the image itself and the second one being empty.
Of course this is quite a weird way to save an image, but it seems that it still is valid and other viewers are able to load it correctly.
This change fixes the loading of multipiece images.
(cherry picked from commit 3506fb2ea8)
Turns out some files contain images saved in the xps archive as a directory containing multiple pieces, the first one being the image itself and the second one being empty.
Of course this is quite a weird way to save an image, but it seems that it still is valid and other viewers are able to load it correctly.
This change fixes the loading of multipiece images.
First issue:
- The "document is totally signed" was based on the last signature of
the last page (that had signatures) that is not correct and needs to
be based in the last signature by date
- The "Rev #" number was based on the signature on the page, so if we
had two pages with one signature each the model showed "Rev 1" for
both
It adds new API which is not awesome in a stable branch, but the first
issue is important enough that warrants this to go to the stable branch
e.g. the ones in poppler issue 824
The PDF spec doesn't say (or I couldn't find it) how a user entered
string is converted to the byte array needed for password checking, so
we try both latin1 and utf8
Disable a few new warnings in clang-tidy
bugprone-implicit-widening-of-multiplication-result and
bugprone-easily-swappable-parameters seem like would be nice to fix, but
no time now
I'm going to need to break binary compatibility to add a new feature
so may as well cleanup all the TODOs regarding that
Changes:
* Moving a few destructors to the header
* Removing a few unnecessary & in params
* Adding a few necessary & in params
* Making print return an enum instead of a bool and then having another
function that returns the enum
* Make Generator::requestFontData be a virtual
* Remove unused enum
* Remove a few filePrinter unneeded functions
* Remove unused TextDocumentGenerator::addMetaData signal
Removes the smooth property of PageItem since it was never set and clazy
was complaining about it not having a NOTIFY signal
Remove two signals that already exist in parent class
Fix C++11 detach in range-loop
It's desktop unless you're building for Android where the default it's
mobile.
You can still manually specify which UI you want and you'll get that
regardless of the platform
Only require KParts if we're building the desktop UI
Two small changes in CI:
* Stop pretending we have a macOS CI
* Add Android CI
- libkexiv2, khtml and kjs would be nice but we don't have Android builds
yet