Commit graph

2644 commits

Author SHA1 Message Date
l10n daemon script 566687744e 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"
2022-07-02 01:59:30 +00:00
l10n daemon script 07b9872518 GIT_SILENT made messages (after extraction) 2022-07-02 00:44:24 +00:00
Heiko Becker f9e78b9253 GIT_SILENT Update Appstream for new release
(cherry picked from commit 6bc195446d)
2022-07-01 21:37:09 +02:00
l10n daemon script 9df4986183 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"
2022-07-01 01:46:49 +00:00
Harald Sitter 8870f6074f alias generator desktop files
this allows UIs to know that this is really okular and may show okular
instead (considering the generators are nodisplay=true)

specifically this allows the xdg-desktop-portal-kde to show okular in
its appchooser dialog even though the actual mimetype match happend
against (e.g.) okularApplication_pdf.desktop and is NoDisplay

(mobile curious has inconsistent naming, the main desktop file is
definitely org.kde.okular.kirigami.desktop)
2022-06-17 17:37:10 +00:00
l10n daemon script d17b4ab2e9 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"
2022-06-13 02:20:38 +00:00
l10n daemon script a761a59630 GIT_SILENT made messages (after extraction) 2022-06-13 00:54:48 +00:00
Albert Astals Cid 12a222c950 Merge remote-tracking branch 'origin/release/22.04' 2022-06-09 11:21:35 +02:00
l10n daemon script b910edafb6 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"
2022-06-09 03:27:27 +00:00
l10n daemon script 1626b59fef 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"
2022-06-09 02:00:18 +00:00
l10n daemon script 06612d93f0 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"
2022-06-07 03:45:56 +00:00
l10n daemon script 4c57664483 GIT_SILENT made messages (after extraction) 2022-06-07 02:58:00 +00:00
l10n daemon script dfe316c6ec 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"
2022-06-07 02:06:15 +00:00
l10n daemon script f0b94bee66 GIT_SILENT made messages (after extraction) 2022-06-07 00:47:37 +00:00
Heiko Becker 6ad408cd66 GIT_SILENT Update Appstream for new release 2022-06-04 10:27:58 +02:00
l10n daemon script c823af787b 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"
2022-05-31 03:16:29 +00:00
l10n daemon script a1d0b42a7f 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"
2022-05-31 01:55:33 +00:00
l10n daemon script dbe951e103 GIT_SILENT made messages (after extraction) 2022-05-17 02:10:46 +00:00
l10n daemon script 8880077fe6 GIT_SILENT made messages (after extraction) 2022-05-17 00:43:26 +00:00
l10n daemon script ad813d6667 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"
2022-05-13 02:49:57 +00:00
l10n daemon script 9b57bb847e GIT_SILENT made messages (after extraction) 2022-05-13 02:11:05 +00:00
l10n daemon script e8d5f24ad4 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"
2022-05-13 01:44:03 +00:00
l10n daemon script 3001fcb88d GIT_SILENT made messages (after extraction) 2022-05-13 00:44:03 +00:00
l10n daemon script c53a64c8da 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"
2022-05-09 02:50:27 +00:00
l10n daemon script 8805d1bde9 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"
2022-05-09 01:41:46 +00:00
Heiko Becker be0f1090ae GIT_SILENT Update Appstream for new release
(cherry picked from commit 3144226af6)
2022-05-07 11:34:49 +02:00
Heiko Becker 3144226af6 GIT_SILENT Update Appstream for new release 2022-05-07 11:34:30 +02:00
Albert Astals Cid 8e311cf26d Fix logical mistake in 44304b32a5
ifndef feature means < when checking for feature not >=
2022-05-04 23:41:42 +02:00
Albert Astals Cid 44304b32a5 Use the poppler version includes instead of check_cxx_source_compiles 2022-05-04 01:16:35 +02:00
Daniel Novomeský 7c596be34a kimgio: enable JPEG XL format
BUG: 453131
2022-04-29 09:34:48 +00:00
l10n daemon script 7cd0d78b5c 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"
2022-04-14 01:42:53 +00:00
Heiko Becker 715b8707b5 GIT_SILENT Update Appstream for new release
(cherry picked from commit 172f4edeae)
2022-04-12 23:28:06 +02:00
Heiko Becker 172f4edeae GIT_SILENT Update Appstream for new release 2022-04-12 23:27:55 +02:00
Nicolas Fella 4202ccf000 [epub] Fix Windows build
epub_open wants const char*, not QByteArray
2022-04-11 18:35:05 +00:00
Albert Astals Cid 52d1a3b91e Fix "endl" use
If it was at the end of qDebug/qCritical/etc, just remove it, those
already have a newline at the end

The other few convert them to \n
2022-04-08 16:37:44 +02:00
Albert Astals Cid 0d40301d50 Add a few definitions that will come with ECM 5.85
Better enforce them now, so that the work to port doesn't increase over
time

Not a super fan of this for regular applications, but oh well the ship
has sailed
2022-04-07 23:02:12 +00:00
M  B  5339b7eef1 Markdown: Fix images with special chars in URLs not loaded
If an image URL contains a non-ASCII character (e.g. `kartöffelchen.jpg`), the html returned by the markdown parser contains the encoded path `kart%C3%B6ffelchen.jpg`. We must decode the path before checking if the image file exists.

(cherry picked from commit 8aa96484da)
2022-04-04 00:29:20 +02:00
M  B  8aa96484da Markdown: Fix images with special chars in URLs not loaded
If an image URL contains a non-ASCII character (e.g. `kartöffelchen.jpg`), the html returned by the markdown parser contains the encoded path `kart%C3%B6ffelchen.jpg`. We must decode the path before checking if the image file exists.
2022-04-03 16:02:44 +00:00
Albert Astals Cid 5ceeb68dfe Remove unused KIO::Core dependencies 2022-04-03 10:57:09 +00:00
Albert Astals Cid 252236d413 Port a few more QLinkedList to QList
We don't need the special properties of QLinkedList in any of those and
QLinkedList is deprecated, so move away from it
2022-03-31 17:08:01 +02:00
Albert Astals Cid 5944ce059f Android: improve a bit the "androiddeployqt is not smart and needs help" code
We do that by:
 * Remembering all the generators we're building
 * Linking the dependencies of all those generators against the app

For that to work we do three things:
 * Move the creation of the app target to after the generator targets
   have been created
 * Have a global variable that lists all the created generators
 * Move the find_package of the generator dependencies to the top level
   so it can be used from the mobile app target
2022-03-28 20:25:04 +00:00
Albert Astals Cid d72d3a01a5 Merge remote-tracking branch 'origin/release/22.04' 2022-03-28 22:19:45 +02:00
Albert Astals Cid dbcda67ab9 Fix opening CHM files on Windows
This is part of 451985 the other part is that KF5.91 windows build of
khtml was broken, seems the 5.92 one is good, so once we release 22.04.0
it should be all good hopefully.

BUGS: 451985
2022-03-28 22:17:42 +02:00
Albert Astals Cid 0741ef1838 Port away from more QLinkedLists
QLinkedList is gone from Qt6

The almost 1:1 port is std::list but we don't need iterator stability on
removal/insertion so just port to QList
2022-03-22 12:58:59 +01:00
Albert Astals Cid 8941e43488 Port away from more QLinkedLists
QLinkedList is gone from Qt6

The 1:1 port is std::list but we don't need iterator stability on
removal/insertion so just port to QList (one case to std::vector since
QList needs a copy constructor)
2022-03-22 00:11:55 +01:00
Georgiy Sgibnev 17be599933 Dealing with a tmp file in case of a signing fail 2022-03-21 09:40:58 +03:00
Albert Astals Cid 6767b8739e Port a few QLinkedList to QList
QLinkedList is deprecated in later Qt5 and gone in Qt6

The 1:1 port is std::list but in this cases all we ever do
is create the lists, push back to them, and pass then around
to be read, for that a QList is more than enough
2022-03-19 11:22:55 +00:00
Albert Astals Cid 6747e7fe8b signals-> Q_SIGNALS
A future ECM update is going to force that on us, so do it now anyway
2022-03-19 10:58:47 +00:00
Albert Astals Cid a2e1043149 slots -> Q_SLOTS
A future ECM update is going to force that on us, so do it now anyway
2022-03-19 10:58:47 +00:00
Albert Astals Cid ba35bbd9e6 emit -> Q_EMIT
A future ECM is going to force that on us, so do it early
2022-03-19 10:58:47 +00:00
snooxx 💤 2ad9e6f0b3
Simplify QPainter::drawRoundedRect usage
After fixing the porting mistake done in 78d983ee, `drawRoundedRect` can
be further simplified to not use any relative sizes anymore.

We can also assume that the code in `dviRenderer::epsf_special` was
supposed to use a constant corner radius and therefore was wrong
initially. By dropping `Qt::RelativeSize` the code might become closer
to its originally intended behavior.

Test Plan:
  - No change in behavior for rounded corners of "Welcome" popup message
    and "No Annotations" message in sidebar.
  - Could not test DVI code path.
2022-03-09 22:38:55 +00:00
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
snooxx 💤 667e73325a
Restore properly rounded corners of popup messages
78d983ee led to some rounded corners in the UI not being perfectly
circular anymore: Popup messages would stretch the rounding depending on
message length, and the rounded corner of the message in the annotation
bar would get distorted while changing the sidebar's width.

That commit tried to fix the following `warning: ‘void
QPainter::drawRoundRect(int, int, int, int, int, int)’ is deprecated:
Use drawRoundedRect(..., Qt::RelativeSize)` by changing to
`drawRoundedRect`, but missed to also add `Qt::RelativeSize`.

Adding the missing flag fixes both issues. The change is also
implemented in `dviRenderer::epsf_special` (introduced in be544056,
changed in 55dc43bf) for correctness.

Test Plan:
  - Start Okular. The "Welcome" message and the "Document Loaded"
    message have perfectly rounded corners again, not depending
    on message length.
  - Change width of the annotations sidebar: The "No Annotations"
    message does not change its rounded corners anymore.
  - Running in HiDPI mode retains the correct behavior.
  - Note: There does not seem to be a trivial/convenient way to trigger
    the DVI code path.
2022-03-07 14:01:53 +00:00
Albert Astals Cid 1aa175cf3f Support SaveAs action
If a new enough (unreleases as of now) poppler is available

BUGS: 451010
2022-03-06 19:16:27 +00:00
Heiko Becker fe5847155c GIT_SILENT Update Appstream for new release
(cherry picked from commit b2d872c79f)
2022-02-27 19:11:13 +01:00
Albert Astals Cid 4cd6bfd30e mobile: Add Signature Viewing UI
Move a few files from part/ to gui/ since they are also used by the
mobile/ frontend
2022-02-18 08:32:13 +00:00
l10n daemon script c014232697 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"
2022-02-11 01:43:34 +00:00
l10n daemon script 18fab8e19b GIT_SILENT made messages (after extraction) 2022-02-11 00:42:43 +00:00
l10n daemon script 5115d6db24 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"
2022-02-05 01:43:36 +00:00
Albert Astals Cid 218edc6f4a Merge remote-tracking branch 'origin/release/21.12' 2022-01-29 11:47:52 +01:00
Albert Astals Cid 5d1d412092 Fix opening epub files with non ascii names on Windows
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
2022-01-29 00:42:15 +00:00
Albert Astals Cid feef900250 Make sure helper apps we start are in path
QProcess will happily start things in CWD which is not what we want
2022-01-28 22:51:20 +00:00
Heiko Becker db9dd90925 GIT_SILENT Update Appstream for new release
(cherry picked from commit 715fd1ac36)
2022-01-28 23:45:01 +01:00
Heiko Becker 715fd1ac36 GIT_SILENT Update Appstream for new release 2022-01-28 23:44:37 +01:00
Fabio Bas da5fdc151b XPS: fix multipiece image loading
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)
2022-01-26 13:50:40 +01:00
Fabio Bas 3506fb2ea8 XPS: fix multipiece image loading
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.
2022-01-26 11:08:53 +00:00
Albert Astals Cid a8e5f6e9f7 PDF: Allow signing unsigned signature fields 2022-01-24 13:18:36 +01:00
Albert Astals Cid fa6743aa04 Support the PDF Print named action
Also stop casting directly from a poppler enum to an okular enum, it's
not cool

BUGS: 448791
2022-01-23 22:20:46 +00:00
Leonid Soshinskiy cc0e128561 fb2: fix duplicating book title, annotation, cover etc. 2022-01-06 09:57:43 +00:00
Albert Astals Cid bc9ca92885 if -> ifdef 2022-01-06 00:04:29 +01:00
Lenny Soshinskiy 2b837e08a0 fb2: show keywords in DocumentInfo 2022-01-05 15:16:55 +00:00
Albert Astals Cid f03bbfa89d PDF: Allow signing documents that need password to open them
We need the password since in the middle of the signing process we need to reopen
the document we just created to do some final modifications
2022-01-05 13:59:37 +00:00
Albert Astals Cid e2ac1dcd1e PDF: Fix memory leak when the file has Optional Content links 2022-01-04 16:42:35 +00:00
Yuri Chornoivan 3400e8aee6 Remove extra spaces in FB2 paragraphs
BUG: 359059
2022-01-04 12:08:43 +00:00
Heiko Becker 11448b94b1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8a09492a9a)
2022-01-04 01:06:53 +01:00
Heiko Becker 8a09492a9a GIT_SILENT Update Appstream for new release 2022-01-03 22:29:30 +01:00
Albert Astals Cid b38b2dfe52 Merge remote-tracking branch 'origin/release/21.12' 2022-01-03 21:54:22 +01:00
Albert Astals Cid e7eb937d28 Fix opening some password protected documents
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
2022-01-03 18:26:49 +00:00
Albert Astals Cid a2576dc746 Act on core/ TODOs that are not binary compatible
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
2021-12-29 09:35:25 +00:00
Albert Astals Cid 84d977dd2d GIT_SILENT Update Appstream for new release 2021-12-09 17:12:37 +01:00
Albert Astals Cid 09a2b506ed GIT_SILENT Update Appstream for new release
(cherry picked from commit 84d977dd2d)
2021-12-09 17:12:37 +01:00
Albert Astals Cid 97f06be67f Merge remote-tracking branch 'origin/release/21.12' 2021-12-07 12:11:44 +01:00
Albert Astals Cid 8126b99062 Make CI happy
Comment an unused varaible
2021-12-07 11:41:27 +01:00
l10n daemon script 0439961dce 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"
2021-12-06 02:44:04 +00:00
l10n daemon script 9b24a11eb1 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"
2021-12-06 01:39:35 +00:00
Albert Astals Cid c962c6caf6 kimgio generator: Make kexiv2 dependency optional
getting keviv2 to build on Android is hard (TM)
2021-11-29 11:59:01 +00:00
l10n daemon script a520e4378b 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"
2021-11-14 01:27:45 +00:00
Albert Astals Cid f686f4c6bf Markdown: Don't crash on files with html images, alt text, inside links
If we have code like <a><img></a><a><img></a> and the img has alt text

The old code did
  remove image
  insert alt text
but when we remove the image, the qtextdocument says
  "i don't need the <a> anymore since there's nothing inside"
and then everything breaks because the layout has changed and we're
iterating over "unexisting" text blocks

So instead we just insert the alt text and
since we have selected the image with the cursor it will
replace it correctly

BUGS: 444971
2021-11-08 21:23:06 +00:00
Heiko Becker b5eebfa12d GIT_SILENT Update Appstream for new release
(cherry picked from commit 2a00f650c5)
2021-10-31 11:18:54 +01:00
Heiko Becker 458c72a9c3 GIT_SILENT Update Appstream for new release
(cherry picked from commit 4304bcc397)
2021-10-05 00:16:35 +02:00
Mahmoud Khalil 8b3dfcb3f4 PDF: Add Stamps to the file properly
By using Poppler 20.10 new custom image stamps APIs

Instead of the incompatible hack we used before that only worked for Okular.

This is done by modifying the update function used by PopplerAnnotationProxy in order to load the image in
the correct dimensions and send it to the poppler-Qt5 frontend.

We temporarily store the stamp annotation appearance when deleting it so that we can set it again when doing an undo undo.
2021-10-01 16:04:50 +00:00
l10n daemon script 84c9f3ea2a 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"
2021-10-01 01:22:33 +00:00
Albert Astals Cid 3b8cbc3320 markdown: Only remove text if we're going to add something
Otherwise things get confused

BUGS: 443057
2021-09-29 07:47:47 +00:00
Albert Astals Cid 1c3e5b23d2 PDF: Support not contacting OCSP servers when validating signatures
This is sub-optimal since will not check if the certificate has been
revoked but is more privacy friendly since doesn't leak to the
certificate authority server that you're trying to validate a given
certificate
2021-09-28 21:33:07 +00:00
Nate Graham 6d2623a029 Merge branch 'release/21.08' 2021-09-24 10:07:15 -06:00
Nate Graham 51d91bfdcb Automatically enable and disable "Force Rasterization" when required
Okular implements various print scaling options that require the use of
the "Force rasterization" feature or else they have no effect. However
this is not communicated in the UI anywhere or handled automatically,
leading to users being confused and frustrated when the print scaling
option they chose didn't work. It wastes paper too.

This commit causes the "Force rasterization" checkbox to become checked
automatically whenever the user selects a print scaling option that
requires it, and unchecked if they return to the default scaling mode
that does not require it.

BUG: 434247
FIXED-IN: 21.08.2
2021-09-23 15:19:27 -06:00
l10n daemon script e6c6e52253 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"
2021-09-15 01:20:14 +00:00
l10n daemon script 9a4f79ff83 GIT_SILENT made messages (after extraction) 2021-09-15 00:17:02 +00:00
l10n daemon script 7c87c702df 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"
2021-09-10 02:19:38 +00:00
l10n daemon script 7ae4288f35 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"
2021-09-10 01:16:35 +00:00