Commit graph

9124 commits

Author SHA1 Message Date
Katarina Behrens
6cff306bab Making 'Sign' button a toggle was a bad idea 2020-12-13 21:31:14 +00:00
Katarina Behrens
3330f8407a Open filepicker to select p12, pfx file to add to user identity 2020-12-13 21:31:14 +00:00
Katarina Behrens
242710cae7 Recycle WidgetConfigurationToolsBase for certificate management dlg 2020-12-13 21:31:14 +00:00
Katarina Behrens
060175735f Open certificate selection dialog on mouse release 2020-12-13 21:31:14 +00:00
Katarina Behrens
339ce239f5 Draw an initial rectangle where to place the signature 2020-12-13 21:31:14 +00:00
Katarina Behrens
b5117aff6c Add slot for 'Sign' button, shows info overlay so far 2020-12-13 21:31:14 +00:00
Katarina Behrens
888d287f1f Add 'Sign' button to toolbar 2020-12-13 21:31:14 +00:00
Katarina Behrens
69ddb957f1 Add config page to configure signing identities/certificates 2020-12-13 21:31:14 +00:00
Katarina Behrens
2845db76fb Add 'Sign' menu entry 2020-12-13 21:31:14 +00:00
Albert Astals Cid
35590a273d Fix CI
Laurent please use MR like everyone else does, otherwise you break the
build for the rest of us.

CCMAIL: montel@kde.org
2020-12-13 21:59:08 +01:00
Laurent Montel
dd1938755e Don't include QtTest as it includes all QtCore includes 2020-12-13 17:51:28 +01:00
Nicolas Fella
50e8c4f333 Port an occurence of KMimeTypeTrader
It is about to be deprecated

See https://phabricator.kde.org/T12177
2020-12-12 18:04:26 +00:00
Carl Schwan
88eb005c93 Fix regression introduced by previous QML commits
Now you can again swipe a pages and id is correct
2020-12-11 15:38:47 +01:00
Carl Schwan
d7f90b74a3 Use placeholder message for initial loading of a document
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.
2020-12-11 14:31:21 +00:00
Carl Schwan
6af6742067 Visual improvements to drawer
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.
2020-12-10 23:45:21 +00:00
Albert Astals Cid
604a4e1db2 clang-tidy: Disable bugprone-suspicious-enum-usage
Unfortunately it's triggered by QKeySequence needing a
Qt::KeyboardModifier and a Qt::Key
2020-12-10 00:02:14 +01:00
Albert Astals Cid
8176613076 Merge remote-tracking branch 'origin/release/20.12' 2020-12-10 00:01:29 +01:00
Albert Astals Cid
bc85160d7f clang-tidy: Disable performance-no-automatic-move
It's just too aggressive with Qt classes that are refcounted and fine to
copy
2020-12-09 21:37:32 +01:00
Albert Astals Cid
39846f8c16 Merge remote-tracking branch 'origin/release/20.12' 2020-12-09 21:15:36 +01:00
Albert Astals Cid
d1c2eed1b6 Make the CI pass with new clang-tidy
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.
2020-12-09 19:53:50 +01:00
Laurent Montel
3f58639e06 operator+/- is disabled for QFlags in qt6 2020-12-09 08:34:49 +01:00
Carl Schwan
5c3da77dcd Add standard AboutPage to Okular Mobile 2020-12-09 04:53:52 +00:00
Carl Schwan
f470c235ce Use correct window title on mobile
Before it just displayed "okularkirigami" when no document was loaded
2020-12-08 15:26:35 +00:00
Carl Schwan
3ac4c8a81b Use Kirigami.SearchField
Provides following advantages:

* More semantically correct
* Visually consistent with QWidgets and QML search fields
* Correct QAccessible fields
2020-12-08 12:07:33 +01:00
Carl Schwan
4a53680529 Use pageStack instead of anchor.fill 2020-12-08 10:04:57 +01:00
Albert Astals Cid
d9487fc764 Merge remote-tracking branch 'origin/release/20.12' 2020-12-06 19:13:23 +01:00
Albert Astals Cid
4f2c2b2714 Document::openRelativeFile: Double check the url changed when we asked to
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
2020-12-06 17:33:34 +00:00
Christoph Feck
3c1b04da47 GIT_SILENT Upgrade release service version to 20.12.0. 2020-12-02 22:50:04 +01:00
Albert Astals Cid
e200d90de2 cmake: Modern way to link to tiff 2020-12-02 19:01:32 +01:00
Albert Astals Cid
43ae701345 cmake: Modern way to link to freetype 2020-12-02 19:00:18 +01:00
Albert Astals Cid
3cc7bdd1d7 cmake: Modern way to link to zlib 2020-12-02 18:57:49 +01:00
Albert Astals Cid
3129b642f9 cmake: Modern way to link to jpeg 2020-12-02 18:55:59 +01:00
Marat Radchenko
2aa9f18fe7 initial tables support for FictionBook 2020-11-29 23:12:37 +03:00
Friedrich W. H. Kossebau
48891b7203 ui.rc files: consistently use <gui> instead of deprecated <kpartgui> 2020-11-28 17:29:11 +01:00
Marat Radchenko
29ed5d1dd7 handle <subtitle> inside <cite> in FictionBook documents
(cherry picked from commit 2e3faa0052)
2020-11-28 02:20:30 +01:00
Marat Radchenko
2e3faa0052 handle <subtitle> inside <cite> in FictionBook documents 2020-11-27 10:25:34 +03:00
Marat Radchenko
9f7b45271f add support for <subtitle> tag in FictionBook
(cherry picked from commit bcdd5a996c)
2020-11-27 00:30:19 +01:00
Albert Astals Cid
6f761b9e3a Merge remote-tracking branch 'origin/release/20.12' 2020-11-27 00:29:36 +01:00
Albert Astals Cid
239827baad Rework how we open urls that have a #
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
2020-11-26 10:07:58 +00:00
Albert Astals Cid
023976ccfd Show annotation tip when selecting the tool in continuous mode
BUGS: 426782
2020-11-26 09:12:21 +00:00
l10n daemon script
a61977aa8a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-26 10:02:48 +01:00
Albert Astals Cid
d2ae2c283d More fine tuning of the mime of the opened file
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
2020-11-25 22:41:34 +00:00
Marat Radchenko
bcdd5a996c add support for <subtitle> tag in FictionBook 2020-11-25 11:16:50 +03:00
l10n daemon script
33483a10fa GIT_SILENT made messages (after extraction) 2020-11-25 08:38:49 +01:00
l10n daemon script
c9440a9160 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-25 06:34:22 +01:00
l10n daemon script
a752711872 GIT_SILENT made messages (after extraction) 2020-11-25 02:20:39 +01:00
Christoph Feck
639cd0b42d GIT_SILENT Upgrade release service version to 20.11.90. 2020-11-25 02:09:48 +01:00
Nate Graham
49a7caf64c Merge branch 'release/20.12' 2020-11-20 12:01:00 -07:00
David Hurka
c6a3275151 Fix QScroller crash on Qt < 5.14 and certain screen arrangements
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
2020-11-20 18:01:20 +00:00
Alex Rosca
8ae95b29c8 Avoid unintentional accelerating flicks by reducing maximum flick time
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.
2020-11-20 17:54:07 +00:00