Commit graph

1987 commits

Author SHA1 Message Date
Albert Astals Cid 030a34f1ff Fix Windows compile with new stricter defines 2022-04-08 10:52:26 +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
Albert Astals Cid 8c31962e81 Port a few QLinkedList to std::list
here we do quite a bit removals from the middle, so feels better to have
something that is cheap to do that like std::list
2022-03-31 17:27:13 +02: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
l10n daemon script 5042078495 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-03-29 02:04:54 +00: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
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 2d007f27d3 foreach -> for
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
Thiago Simão af91d33070 Create empty inline note and then open dialog to get user's input. 2022-03-12 00:57:36 +01:00
Albert Astals Cid df68aa0112 Remove extra bunch of {} added by clang-tidy ^_^ 2022-03-10 12:07:06 +01:00
Albert Astals Cid 9d3842c796 Move to clang-format 13 2022-03-10 00:23:22 +01:00
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
Nicolas Fella d1ecad897c Implement keystroke commit events
When a form field loses focus a special keystroke event with
willCommit=true is sent.

This is based on work by Joao Netto <joaonetto901@gmail.com>
2022-03-07 22:14:26 +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
Nicolas Fella 5e8beb532a Set correct textfield value on keystroke
event.value is the old value, we need to set the new value here

Modifying event.value is not supported when not committing
2022-03-02 23:20:14 +01:00
Nicolas Fella fd1c312d57 Fix keystroke events
event.value is the value before editing, not after
2022-02-24 23:39:28 +00:00
Nicolas Fella 6c8cafbb1c Simplify keystroke event handling
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
2022-02-24 16:10:22 +01:00
Andreas Naumann 147a638619 Adds option editor-cmd to the commandline
Adds the option "editor-cmd" for the [feature request](https://bugs.kde.org/show_bug.cgi?id=263732) .

BUG: 263732
2022-02-18 13:33:28 +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 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
Albert Astals Cid 8a36e7350d Make Utils::realDpi work on QWindow not on QWidget
Small step towards the goal of okularcore not linking to QWidgets
2022-01-27 19:25:30 +01: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
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 df4a7ef4e9 Merge remote-tracking branch 'origin/release/21.12' 2022-01-05 14:01:09 +01:00
Albert Astals Cid e2ac1dcd1e PDF: Fix memory leak when the file has Optional Content links 2022-01-04 16:42:35 +00:00
Albert Astals Cid 44c86de7e4 Fix two Signature issues on multipage/multisignature documents
First issue:
 - The "document is totally signed" was based on the last signature of
   the last page (that had signatures) that is not correct and needs to
   be based in the last signature by date

 - The "Rev #" number was based on the signature on the page, so if we
   had two pages with one signature each the model showed "Rev 1" for
   both

It adds new API which is not awesome in a stable branch, but the first
issue is important enough that warrants this to go to the stable branch
2022-01-03 23:38:23 +01:00
Albert Astals Cid d6870ae2ff Remove deprecated Generator::documentMetaData 2021-12-29 18:49:56 +01: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
Oliver Sander 24e48d9f5c Fix a typo in JavaScript code documentation 2021-12-14 09:37:51 +01:00
Albert Astals Cid 62eec7d5b1 Show the "No signing certs" warning earlier
No need to ask for the user to draw a rectangle for the signature
if there's no certs to sign anyway

CCBUGS: 446549
2021-12-12 23:43:37 +00:00
Albert Astals Cid 0d4f463729 Fix implementation of AFNumber_Format
We did not take sepStyle 3 into account.

Also sepStyle 1 and 0 where mixed up and it didn't work either because
replace() needs to be assigned back to the string

BUGS: 445868
2021-11-29 11:15:46 +00:00
Albert Astals Cid 810e9db2bb Merge remote-tracking branch 'origin/release/21.08' 2021-10-23 11:59:12 +02:00
Albert Astals Cid 2002f4e7e9 Relax the check for non square DPI
BUGS: 444168
2021-10-22 22:23:49 +00:00
Albert Astals Cid 7ccdd513b9 Merge remote-tracking branch 'origin/release/21.08' 2021-10-06 23:19:06 +02:00
Albert Astals Cid 913560eb78 util.printd: Don't crash if we get an unexpected oDate argument
BUGS: 443255
2021-10-05 22:55:16 +02:00
Albert Astals Cid a408499889 Make the stamps renderer as static as before
Looking for and loading the SVG file isn't cheap so cache it as we did
in the past
2021-10-01 19:31:23 +02:00
Albert Astals Cid b3379d331d Fix documentation of AnnotationUtils::loadStamp 2021-10-01 18:55:19 +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 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
Albert Astals Cid 1f84075c12 Don't use KMessageBox in document class
Just use the existing signals to warn the user about it
2021-09-09 17:43:26 +02:00
Albert Astals Cid 0c659a5466 clang-tidy: Enable google-explicit-constructor 2021-08-29 08:52:35 +00:00
Albert Astals Cid eee71036a7 Fix crash in bug 400104 again
And also make clazy happier so we don't need an exclude
2021-08-27 10:45:35 +02:00
Albert Astals Cid c0de8366fc Merge remote-tracking branch 'origin/release/21.08' 2021-08-27 10:44:29 +02:00
Albert Astals Cid bed447f769 textpage: Don't use the page bounding rect as initial text rect
The bounding rect is *visual* and it can happen that we have
invisible text and thus the algorithm will get super confused
because there will be text items that are outside the text area
2021-08-27 06:52:28 +00:00
Albert Astals Cid b747f0feb1 CI: silence clazy warning now that there's a new clazy version 2021-08-27 00:15:17 +02:00
Alex Richardson 0f4f3b1902 Fix -Werror build failure in synctex parser
I am cross-compiling with clang for FreeBSD and the build is failing with:
error: initializing 'char *' with an expression of type 'const char [1]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Mark the char pointers as const to fix this build failure.
2021-07-12 14:18:39 +01:00
Luigi Toscano 9327fd485d Fix terminology: MIME Type 2021-07-02 19:27:53 +02:00
Alexander Lohnau ac083e44e3 Make meaning of sponsoring note more clear 2021-06-10 08:11:56 +00:00
Alexander Lohnau bf4c8da4fc Manual fixes to license headers 2021-06-10 08:11:56 +00:00
Alexander Lohnau 24c75071be Move sponsoring note outside of SPDX-FileCopyrightText statement 2021-06-10 08:11:56 +00:00
Alexander Lohnau 3c5cfc8abc Convert license files for core/synctex directory 2021-06-10 08:11:56 +00:00
Alexander Lohnau 2f193a63de Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
l10n daemon script 6ad2ebdbbb 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-06-02 02:15:07 +00:00
Albert Astals Cid 81344f8aa8 Unbox alert() parameters when they are in an object
API let's you use both arguments or objects with named properties, so
support both.

This fixes the contents of the warning in 435833, the crash is still
there though, working on that next

CCBUGS: 435833
2021-05-24 19:53:03 +02:00
Albert Astals Cid 72658e0ec3 Fix saving signed revisions of a signature
We don't need a QDataStream to assign a QByteArray to a QByteArray, and
it was adding some noise at the beginning which is clearly not what we
want
2021-05-06 21:09:49 +00:00
Oliver Sander ccda6d2a65 Remove device pixel ratio scaling from PixmapRequest
The PixmapRequest constructor expected width and height in logical
pixels, and scaled them to device pixels.  However, not knowing what
screen the request is for, it had to use qApp->devicePixelRatio()
for the scaling.  That value may not be correct if not all screens
use the same scaling.

Fix this by introducing a new constructor that takes the device
pixel ratio as an additional argument, and deprecating the old
constructor.
2021-03-08 00:23:11 +01:00
Albert Astals Cid 275b7ea57c Remove todo from NormalizedRect::operator|
as far as i can see that works just fine

GIT_SILENT
2020-12-25 23:58:33 +00:00
Albert Astals Cid b1fa4caaf2 Merge remote-tracking branch 'origin/release/20.12' 2020-12-22 01:25:17 +01:00
Albert Astals Cid d112682611 Make search work on documents that describe Å as A + ◌̊
BUGS: 430243
2020-12-21 22:32:39 +00:00
Albert Astals Cid 33ccbc0449 Signing: Don't say that there are no certificates if the user cancels...
...entering the pwd for the certificate store

Also Move CertificateStoreImpl to PopplerCertificateStore, since
PopplerCertificateStore was declared but never defined and use it
in CertificateTools to get the certificate list instead of calling
the poppler classes directly
2020-12-13 21:31:14 +00:00
Albert Astals Cid 242718a9a2 Only ask for certificate password if really needed 2020-12-13 21:31:14 +00:00
Albert Astals Cid 49f784ecf9 When signing save to a new file, not over the current one 2020-12-13 21:31:14 +00:00
Albert Astals Cid 9728d8b426 We don't do getFoo in Okular API 2020-12-13 21:31:14 +00:00
Albert Astals Cid 6325a4fe0b Make sure you have no unsaved changes before saving 2020-12-13 21:31:14 +00:00
Albert Astals Cid 18ef1349f1 Improvements to adding digital signatures
* Don't make WidgetAnnotation know about signatures stuff, widget
   annotations are for multiple things
 * Don't create an "empty" widget annotation and then call sign on it
   (which is wrong because widget annotations can be multiple things),
   just say sign the document with this data (cert, l&f, etc)
 * Remove the "management" functionality from CertificateTools it was
   only visual, i.e. it didn't really add/remove certificates
 * Ask for the NSS password (if needed)
2020-12-13 21:31:14 +00:00
Albert Astals Cid b09e23f6ab Run clang-format
Attempting to fix the whole chain of commits is not worth it
2020-12-13 21:31:14 +00:00
Albert Astals Cid bcf54ef2f1 These two methods don't need to be slots 2020-12-13 21:31:14 +00:00
Thorsten Behrens 3eedb21a83 Consistenly use CERT nick to refer to signing key 2020-12-13 21:31:14 +00:00
Thorsten Behrens f7d6045b92 Add poppler NSS support
Move certificate config down into generator code
Read available signing certificates from poppler NSS
2020-12-13 21:31:14 +00:00
Thorsten Behrens b96dac6df3 Add certificate store for access to NSS keys
WIP - add interfaces and methods to get access to NSS-via-poppler
sign certificates, and provide them for signing documents.
2020-12-13 21:31:14 +00:00
Thorsten Behrens 847b423e2a Add better diagnostics 2020-12-13 21:31:14 +00:00
Thorsten Behrens e031822744 Adapt to poppler sign api change
Now poppler offers signing via PDFConverter class. Add some error
handling, and store signature in temp file. Document gets reloaded
after replacing original file.
2020-12-13 21:31:14 +00:00
Thorsten Behrens e3e582ee5c Add feature flag for poppler signing API
Test and conditionally-compile pdf signing feature, depending
on poppler new-ness.
2020-12-13 21:31:14 +00:00
Katarina Behrens cc908b9f92 Pass pointer to widget annotation just added down the chain 2020-12-13 21:31:14 +00:00
Katarina Behrens 03381667f6 Pass certificate CN and password down the chain 2020-12-13 21:31:14 +00:00
Katarina Behrens d320fa17ad Stub some iface for signing the document 2020-12-13 21:31:14 +00: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
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
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
Alexander Lohnau 3c1fa441d9 Remove dead code
A lot of this code has been commented out for over
a decade and adds no value to the project.
It is only annoying when you look over it ;).

Same for the KNS2 support which was commented out.

Also some of the debug statements didn't even build
anymore, because the properties got removed/refactored.
2020-11-14 10:52:00 +01:00
Albert Astals Cid 6bd6714ab0 poppler: Use actual function calls instead of xml to create poppler annotations 2020-11-11 00:43:54 +00:00
Albert Astals Cid becdc7c483 Revert the two last commits
f9841b0f8a and e0f45add55

They break the windows build, which shows there's something defenitely
fishy going on with the current code, but oh well, someone with more
time needs to figure out a proper solution
2020-11-11 01:31:47 +01:00
Albert Astals Cid e0f45add55 Enable -Wweak-vtables in clang
Read https://stackoverflow.com/a/23749273/11956287 for a full
explanation, but basically this is important for headers like the
interfaces/ and kdocumentviewer.h that are supposed to be used by third
partyies where it may happen that wrong things happen because the whole
class is inline in a header

For the classes that are defined in the .cpp or are not installed
headers this would not be necessary but it's not so hard to add a few
default defined destructors, so do that :)
2020-11-08 21:21:06 +00:00
Albert Astals Cid b9c40d709d Fix formatting after Laurent's commit
Please Laurent try to use MR when you do changes that may break our CI
like this one

CCMAIL: montel@kde.org
2020-10-23 22:48:44 +02:00
Laurent Montel 486e05b270 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 07:32:28 +02:00
l10n daemon script dc74ffa68c 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-10-17 06:04:22 +02:00
Nate Graham d78e2ff9e7 Merge branch 'release/20.08' into master 2020-09-29 09:36:56 -06:00
Kezi Olio bdb2df773d Fix forms when inertially scrolling
`setViewport` automatically adds an item to the history if it finds that it
moved for more than a page, which we don't want to do when automatically
scrolling, as with inertial scrolling.

This commit adds a new function `setViewportWithHistory()` which takes an
argument to optionally avoid preserving history. This avoids breaking ABI.
The new history-less functionality is used when inertially scrolling.

BUG: 421354
FIXED-IN: 1.11.2
2020-09-25 15:41:23 +00:00
Friedrich W. H. Kossebau 1784c1d0cb Use more nullptr instead of 0 2020-09-13 11:20:09 +02:00
Thomas Friedrichsmeier 3fda3ba561 Fix build using MinGW 2020-09-11 16:24:44 +02:00
Christoph Cullmann 25984bb2bb add missing export to class
BUG: 426358
2020-09-10 20:51:52 +02:00
Albert Astals Cid 2697105462 Revert cbddcd3273
KJS and KWallet are indeed optional, that's what the ${optionalComponents} variable does
2020-09-09 14:13:09 +02:00
Albert Astals Cid cbddcd3273 kwallet and kjs are mandatory in cmake anyway, remove ifdefs 2020-09-05 23:50:45 +00:00
Albert Astals Cid 511fc7acca Document the valid int values for TextAnnotation::setInplaceAlignment 2020-08-21 15:35:32 +02:00
Albert Astals Cid caa351c723 Bookmarks: Resolve symlinks before using an url
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
2020-08-07 22:34:30 +00:00
David Hurka 93e67cca93 Port away from QDesktopWidget
This ports Shell from QDesktopWidget to QScreen (trivial),
and removes unused QDesktopWidget includes (super-trivial).
2020-08-05 23:24:36 +00:00
Albert Astals Cid 88bf8a87de Fix compile on FreeBSD 2020-07-11 10:11:31 +02:00
Albert Astals Cid 19d98d6a74 Run clang-format
find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;

If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
2020-07-11 09:17:33 +02:00
Albert Astals Cid b558f7f762 Changes to make clang not mess up the clazy comment 2020-07-11 07:51:27 +02:00
Albert Astals Cid bd57b36c83 Add TODO for the future to fix requestFontData function 2020-07-11 07:50:05 +02:00
Albert Astals Cid 4c150c2889 Disable the overloaded-signal in two signals in TextDocumentGenerator
We already have a TODO for when we can do BIC changes
2020-07-09 21:38:29 +02:00
Laurent Montel 516fb89d94 Use camelcase include. (scripted) 2020-07-08 13:54:37 +02:00
Albert Astals Cid a3c7d81000 Merge remote-tracking branch 'origin/release/20.04' 2020-06-30 19:37:33 +02:00
Albert Astals Cid 795c7cb01f Increase kjs requirement for using the timeout check
Unfortunately with the new timeout code but older than 5.72 will crash on appAlert

So increase the requirement to > 5.71
2020-06-24 12:06:32 +02:00
l10n daemon script 7254c56886 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-06-18 08:26:04 +02:00
l10n daemon script 90502b2961 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-06-18 05:35:59 +02:00
l10n daemon script 1f50b2a6b4 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-06-17 16:48:38 +02:00
l10n daemon script 2857dc241f 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-06-17 14:03:40 +02:00
Albert Astals Cid 03cee363cd Merge remote-tracking branch 'origin/release/20.04' 2020-06-15 23:41:57 +02:00
Albert Astals Cid d78cbb79c9 Fix/Workaround file where we can't enter values in some fields
The problem was that the JS checker for the field format was using the
willCommit property of event and we don't define it so the JS
interpreter was going "ok nope, out of here" and the field didn't get edited.

I've read the willCommit definition in js_api_reference.pdf for almost
30 minutes, and even it's just 3 lines i don't think i understand it,
but i think that returning true is "safer", i.e. says that this event is
going to actually change the field, which as far as i can see it's what
we always do

BUGS: 421508
2020-06-15 20:45:21 +00:00
l10n daemon script 35e43602d4 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-06-11 09:34:54 +02:00
l10n daemon script ef53790eba 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-06-10 05:21:36 +02:00
Nate Graham 4ee6b5066d Merge branch 'release/20.04' 2020-06-09 13:16:33 -06:00
l10n daemon script cc452498e5 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-06-09 09:16:32 +02:00
Nate Graham d195633b16 Display all of the page sizes in a new tab of the properties dialog
Previously it just said, "Multiple" for multi-page-size documents.
Now it will tell you the most common page size on the "Properties"
tab, and display a full table of all page sizes in a new "Page Sizes" tab.

For documents with only a single page size, there are no changes.
2020-06-02 23:24:26 +00:00
Nate Graham 0e71c95f29 Show page size field in Properties dialog when there are multiple sizes
Currently when a document has multiple page sizes, the Properties dialog
does not show the "Page Size" field at all. This MR populates the field
with the string "Multiple" for documents with multiple page sizes.
2020-05-27 09:40:50 -06:00
Yuri Chornoivan 4d75045cd8 Fix minor EBN issues 2020-04-04 12:17:50 +03:00
Albert Astals Cid 5035f90dd9 Fix forms sometimes showing an old value
If from processFormatAction we call setAppearanceText,
we need to call setAppearanceText from outside too, otherwise when the
formatting action doesn't create a different text we still show the old
old value

CCBUGS: 418445
2020-03-28 23:12:08 +00:00
Albert Astals Cid d3b43b0b1e Implement AFMakeNumber
Also make stringToNumber be stubborn when converting strings to numbers

CCBUGS: 418445
2020-03-28 23:12:08 +00:00
Albert Astals Cid 9084bfaabe Fake implement AFNumber_Keystroke
Needed by the file at bug 418445, since it's a validate kind of thing we
can leave it unimplemented for now
2020-03-28 23:12:08 +00:00
Albert Astals Cid f69e2114e7 Use poppler choicesWithExportValues if available 2020-03-28 23:12:08 +00:00
Albert Astals Cid 9694113a96 Let the user type the hyphen if he wants when searching
It happens that sometimes the hypen is actually "part of the word" like
in one-third, so if there's one- at the end of a line
and third at the beginning of the next, we should still match and not
force the user to type onethird, even we will also match onethird since
there's no way to know if "hyphen at end of line" is supposed to be part
of the word or not

BUGS: 418520
2020-03-28 13:59:01 +00:00
Albert Astals Cid 6a93a033b4 Document::processAction: If the url points to a binary, don't run it 2020-03-10 23:07:55 +01:00
Andre Heinecke ad405165b1 Add AFNumber_Format and l10n AFSimple_Calculate
This adds utility functions to util to work with QLocale
for formatting and Number handling.

At least until we support AFNumber_Keystroke to restrict
what a user enters in Number input fields it is good
behavior to expect the user to enter Numbers in the system's
Locale.

AFNumber_Format is new for formatting and uses the
Locale util functions.
2020-03-08 13:05:36 +01:00
Kevin Slagle 493853667d add global variable kMemCheckTime 2020-03-06 23:45:29 +00:00
Kevin Slagle 8d501fc43a getFreeMemory is called every two seconds when checking to see if the system is low on memory. Before this commit, half of these checks are useless (when okular is idle) since the cache is used when the cache is <=2 seconds old. This means that after they system is out of memory, up to 4 seconds (instead of 2) could go by before okular starts to free memory. 2020-03-06 23:45:29 +00:00
Albert Astals Cid 4964e7e42d Merge remote-tracking branch 'origin/release/19.12' 2020-03-02 22:22:06 +01:00
Albert Astals Cid 81c005710c Fix re-rendering of images when using partial updates
Partial updates trigger when the page is taking "too much" to render (>
500 ms).

When this happens we store a pixmap for the page, this meant that
Page::hasPixmap returned true, so when moving the viewport around we
would think that that page was already rendered, and thus needed no
rendering so we didn't add it to the list of requested pixmaps.

Then on document when seeing the new list of requested pixmaps we would
go and check and say "oh there's one request going on that we don't want
anymore, let's cancel it", so we would cancel the page that we actually
wanted (and clear the partial pixmap)

Then on the next scroll we would realize we did not have that page
pixmap and then request it again which since it's the current page would
immediately stop all other renders and start this one.

Then we would get a temporary pixmap and the loop of cancellations and
requesting again would keep happening as long as the user moved the
viewport.

We fix that my making hasPixmap return false if the pixmap we have is a
partial one, because that's what the function meant "forever" until we
recently introduced partial updates so all the calls to hasPixmap
actually mean "hasNonPartialPixmap"

BUGS: 418086
2020-03-02 21:06:03 +00:00
Kevin Slagle af99a04431 Use screen size when deciding if tile manager should be used 2020-03-01 09:32:27 +00:00
Albert Astals Cid 3720833be4 Enable clazy qstring-allocations 2020-02-21 17:45:03 +01:00
Albert Astals Cid dcf8f79481 Enable clazy isempty-vs-count and qhash-with-char-pointer-key 2020-02-21 17:09:46 +01:00
Albert Astals Cid 46d1ba0e20 Enable clazy missing-qobject-macro 2020-02-21 17:09:46 +01:00
Albert Astals Cid 6d0d61c2ad Enable clazy copyable-polymorphic 2020-02-21 17:09:43 +01:00
Albert Astals Cid 93540ac16d Enable most of clazy level2 2020-02-21 14:57:48 +01:00
Albert Astals Cid 968e9d6073 Enable clazy old-style-connect 2020-02-20 15:48:08 +01:00
Albert Astals Cid 91bce4a0a3 Enable clazy const-signal-or-slot 2020-02-20 12:42:23 +01:00
Albert Astals Cid e03943fae9 Enable clazy qstring-lef 2020-02-20 12:03:31 +01:00
Albert Astals Cid 95e19450c9 Enable clazy fully-qualified-moc-types 2020-02-20 10:59:54 +01:00
Albert Astals Cid 3b4dd35c9f Enable clazy lambda-in-connect 2020-02-20 10:57:47 +01:00
Albert Astals Cid eddbe03128 enable clazy strict-iterators 2020-02-20 10:15:24 +01:00
Albert Astals Cid 468f4b64c2 CI: Enable clazy inefficient-qlist-soft 2020-02-19 23:44:41 +01:00
Albert Astals Cid e2a1705703 CI: Enable clazy connect-not-normalized 2020-02-19 23:44:41 +01:00
Albert Astals Cid 3af705b3d7 CI: Enable clazy qdeleteall 2020-02-19 23:44:41 +01:00