After 19d98d6a reformatted Okular's codebase with `clang-format`, that
commit was marked to be ignored by `git blame` by adding it to
`.git-blame-ignore-revs` in 4fb45522.
Later, !296 was merged but still needed reformatting, which was done in
b09e23f6. However, the latter commit was still missing from
`.git-blame-ignore-revs`, so let's add it.
Test Plan:
All commits mentioning `clang-format` which reformatted the codebase are
now included in `.git-blame-ignore-revs`.
Make it more similar to how we handle the format event.
We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
The `MiniBar` normally used to display page numbers and to provide
navigation buttons regressed since 01557c16c4 to only show an empty
non-functional button called "Page Number", along with multiple
warnings:
`QObject::connect(MiniBar, QAction): invalid nullptr parameter`
This is caused by moving `setupViewerActions()` to a place where
`m_miniBar` is not initialized yet, even though it has a runtime
`connect`-dependency on it.
By moving `setupViewerActions()` back, the `MiniBar` starts working
again. Now the `m_addBookmark` action, which is created in that
function, is not available anymore to be passed to the constructor of
`BookmarkList`. To avoid moving the setup of the latter away from the
rest of the sidebar code, only assigning the action to the bookmark
button contained in the `BookmarkList` is deferred to
`setupViewerActions()`.
As requested, any accidental future `nullptr`-access will be handled by
crashing, even in Release builds, by omitting any checks.
BUG: 450347
Test Plan:
Page numbers show up again in toolbar, no more `connect` warnings.
Added context menu entry to quick sync thumbnails with the current page. This is handy in case the user is not using "Link the thumbnails with the page" and wants quick sync thumbnails without changing settings or search for the page in the thumbnails view.
Before
![image](/uploads/389216ce4720f1891ddc4f2bf8ee14ea/image.png)
After
![image](/uploads/b4804d11992695d3a6be6642c9d7ac16/image.png)
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.