Perform extra checks on the existence of QDomElement attributes and on the correctness of their conversion from QString to int.
This also prevents a crash if it is not possible to find the built in tool associated to the triggered quick tool.
Only if you're on a new enough KIO, we need
a1acb7744455b57dc972b3073f6e1dce0d49d965
and
7bf4d793a5ac54280c45660dbd04de4fa99dc994
present since 5.73 to make the UI usable
BUGS: 422574
Using the new configuration key BuiltinAnnotationTools instead of AnnotationTools, we avoid any conflicts in the configuration files due to the fact that the key AnnotationTools had a different meaning in the previous versions of Okular. In particular we avoid the critical problem that the actions in the UI do not match the actual annotation tools. The conflict may happen if the kconf_update script is not executed for some reason (e.g. okular running from flatpack).
BUG: 425354
FIXED-IN: 1.11.1
The discount markdown parser supports parsing explicit image sizes in markdown, but we ignore them and replace them with the actual image dimensions. With this patch, any specified image sizes are respected.
* QDesktopWidget -> QScreen
Simplifications:
* After setting new screen/geometry, forget them and let resizeEvent() handle any updates.
* Specifically, don’t connect to screen size change signals.
* Specifically, setScreen() only sets the new widget position and then waits for resizeEvent().
* This also means applyNewScreenSize() and repositionContent() can be collapsed into resizeEvent().
* Replace recalcGeometry() by setScreen(defaultScreen()), where defaultScreen() only checks the configuration.
If a symlink points to another file, we should use that file as
canonical source for bookmarks, it doesn't make sense to have two
different sets of bookmarks for two paths that are essentially the same
file
BUGS: 424340
Screen switching from inside presentation mode currently does not work correctly.
The reason is that the widget geometry() shall be moved
*while* the widget is configured as fullscreen.
This patch temporarily disables fullscreen, so the screen can be switched.
You can check it with release 20.04:
Screen switching from within presentation mode will not work.
Set the widget to windowed (e. g. Alt+F3 or right-click in task manager),
screen switching will work now.
!233 shall port PresentationWidget to QScreen in release 20.12,
so this is just a compact workaround without much intelligence.
The drawback is that custom window rules might get confused when the
screen geometry changes for some reasons.
In this way it is possible to drop the `sourceId` attribute from the quick tools definition. This simplifies the code logic and makes it easier to update user settings from the previous version of Okular (because there is no need to add the attribute `sourceId`
This also fixes the crash due to the fact that `sourceId` was not correctly created when a quick annotation is created from the Annotation page of Okualr Settings.
BUG: 424810
FIXED-IN: 1.11.0
Write doxygen documentation for:
* PagePainter::paintPageOnPainter(), paintCroppedPageOnPainter()
* `Change Colors` algorithm functions of PagePainter
* PagePainter::drawShapeOnImage(), drawPixmapOnImage(); very straightforward,
but added a note on the coordinate system.
* LineAnnotPainter constructor, draw()
Remove unused functions:
* PagePainter::cropPixmapOnImage(), QPixmap::copy() can do it easily today.
PagePainter::drawShapeOnImage() and drawEllipseOnImage() didn’t respect the image’s device pixel ratio.
Steps to reproduce:
* Set your screen scale to e. g. 1.25.
* Open e. g. a .txt document.
* Draw e. g. an arrow annotation or a text markup annotation.
If the annotations are disabled in the current pdf we can skip repopulating "Quick annotations" and in this way we also assure that the enabled/disabled state of the action is preserved upon configuration reparsing.
d->toolsEnabled must be initialized to true, in order to correctly populate the "Quick annotations" action the first time for non-protected pdf, given that setToolsEnabled is called after the first call to populateQuickAnnotations.
BUG: 424296
FIXED-IN: 1.11.0
It's not really like it matters since we're not using the okular
revision information anywhere, but well, at least from the poppler
plugin we're doing the right thing