This also now remove the auto appearing global drawer that is now a menu
on desktop. This also move the main page into the pagestack.
Bump the Kirigami dependency because PlaceHolderMessage doesn't exist in
old version of Kirigami.
Now the drawer open automatically when the window is big enough. The
drawer handle are also only visible when a document is open. The
thumbnails page was also improved and some spacing issues were solved.
Disable bugprone-suspicious-include since it's triggered by the moc
includes
Disable bugprone-reserved-identifier since it's triggered by all our
_OKULAR defines, and yes even if the spec says that underscore is
reserved, are we going to be that unlucky that the library decides to
start using _OKULAR ? not probably
Add two TODOs for the future to make NormalizedRect/Point faster
Silence a warning about a quick moving QString if we make it non const
Silence a uchar vs char warning that is in decades old code so
experience seems to suggest it's ok.
If not, open did not succeed and the callers (for example open document
X in page A) would like to know so they don't have to do the "change to
part A" part.
BUGS: 429924
Previously if it was a remote url that had # and a . after the # we
assumed the url had no fragment and everything was filename.
We don't do that anymore, what we do now is try to open the url as
parsed, i.e. before the # is the filename after is the fragment, and if
that fails we try to open everything as filename and nothing as
fragment.
Unfortunately given how kpart internals handle opening local vs remote
urls we need to do this in two places.
Also we have to remove the test that checked that the url was mangled at
the shell level because we don't do that anymore. Unfortunately can't
add a test for the new codepage since it would involve starting an http
server ^_^
Filenames:
source2e.pdf
foo#bar.pdf
What works:
* okular http://localhost/source2e.pdf#subsection.68.3
* okular file:///srv/http/source2e.pdf#subsection.68.3
* okular source2e.pdf#subsection.68.3 (in the /srv/http folder)
* okular source2e.pdf#2
* okular http://localhost/foo#bar.pdf
* okular file:///srv/http/foo#bar.pdf
* okular foo#bar.pdf (in the /srv/http folder)
What doesn't work:
* okular http://localhost/foo#bar.pdf#2
I think it's a fair limitation that if you want to open a file that contains # in the name and also use a # page marker you need to use the encoded url like okular http://localhost/foo%23bar.pdf#2
after all things like firefox will totally fail opening http://localhost/foo#bar.pdf and will just work if you give the encoded url
BUGS: 426976
In fba90677fc we introduced a "if we're
told this is a text file let's check the mime of the content only since
text files never fail to open".
This extends it to anything that inherits from text now, so if you
rename a PDF file to bla.php it still tries to open as a pdf first and
if that files as a php file
QScrollerPrivate::setDpiFromWidget() before Qt 5.14 crashes
when the target widget does not intersect a physical screen,
because QDesktopWidget returns screen index `-1` in this case,
which leads to an out-of-range read from QApplication::screens(),
which leads to a segfault when reading from an invalid QScreen* pointer.
This adds a workaround that checks for the `-1` situation,
and then tries to resize PageView temporarily to intersect at least some screen.
BUG: 425188
FIXED-IN: 20.12
When making a flick using the mouse or the touchscreen and then slowly
dragging the pages in the same direction with the flick, it unintentionally
reenters the flicking state after a mouse button release and it's quite
annoying. The commit reduces the maximum time before the next flick.
Steps to reproduce:
1) Flick in direction A.
2) While the view is coasting, decide that you want to stop close to the current position.
3) Grab the view (still coasting), and drag it slowly in direction A.
4) When you reached the desired point, stop your movement, and release the view.
5) QScroller interprets this release as “accelerating flick”,
and makes the view coast faster in direction A.
Upstream bug is QTBUG-88249; QScroller ignores MinimumVelocity for accelerating flicks.