Commit graph

8161 commits

Author SHA1 Message Date
Albert Astals Cid 1ab8dd7c62 Fix autotest build if poppler is not installed 2018-04-24 11:59:07 +02:00
Andre Heinecke 7eb72911f8 Add test for visibility changes
The test only tests what is currently supported so it does
not yet test radio buttons and action chains. But
the visibilitytest.pdf already provides these, too.

Differential Revision: https://phabricator.kde.org/D11597
2018-04-23 23:58:11 +02:00
Andre Heinecke bf90867c13 Add support for dynamic visibility
Summary:
This adds the hidden property to JavaScript fields and
uses it to implement support for HideAction.

Test Plan: Unit test in the next commit.

Reviewers: #okular

Subscribers: aacid

Tags: #okular

Maniphest Tasks: T8274

Differential Revision: https://phabricator.kde.org/D11596
2018-04-23 23:55:01 +02:00
Albert Astals Cid b3f8b51b39 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-23 23:09:19 +02:00
Albert Astals Cid 991eb0ed31 Use toLocal8Bit instead of toUtf8
It's the most "proper" way to do it, i guess in real world scenarios it
doesn't really matter though
2018-04-23 23:08:06 +02:00
Chinmoy Ranjan Pradhan c559268987 Obey umask rules when saving new file
Summary:
Okular saves a new file with permissions 0600 completely ignoring the umask value. This is because it
makes use of QTemporaryFile which creates file with the said permissions and which then Okular copies
to the new location.
So to overcome this generate new file permissions using old mask value and change permissions of the
new file.

BUG: 392682

Test Plan:
Set umask to 0040
Open a pdf file from the same shell and save it under a new name.
Before patch:
file permisions -> 0600
After patch:
file permisions -> 0606

Reviewers: #okular, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12049
2018-04-23 23:07:19 +02:00
l10n daemon script d2fe4868e1 GIT_SILENT made messages (after extraction) 2018-04-23 03:36:39 +02:00
Aleix Pol 2648ad7b73 Correctly list the supported file suffixes 2018-04-22 23:00:49 +02:00
Aleix Pol 077d0219fe Did not meant to commit that
Damn arcanist >.<
2018-04-22 22:33:27 +02:00
Aleix Pol 1fb77446a7 Make it possible to disable the build of okularkirigami
Summary:
Some distros seem to have the option.

BUG: 393119

Test Plan: Still builds, can disable build

Reviewers: #okular, mart, aacid, lbeltrame

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12352
2018-04-22 22:23:11 +02:00
Albert Astals Cid 33a2eaf3c4 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-22 19:46:41 +02:00
Albert Astals Cid 3cea7c9927 Fix crash on exit when having edited a text area
For some reason Q/KTextEdit is sending textChanged inside the
destructor, so protect us from that.

BUG: 393334
2018-04-22 19:46:04 +02:00
l10n daemon script 7c297a2a41 GIT_SILENT made messages (after extraction) 2018-04-21 03:37:32 +02:00
Simone Gaiarin cbc6f671e3 Change annotation type name when an annotation is associated to non-empty popup
Summary:
Mark the annotations that contain a non-empty popup. Especially useful to identify annotations that are not meant to contain an annotation as shapes or highlights.

BUG: 389836

Reviewers: #okular, aacid

Reviewed By: #okular, aacid

Subscribers: rkflx, aacid, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D10797
2018-04-20 19:43:14 +02:00
l10n daemon script 50b01e1e78 GIT_SILENT made messages (after extraction) 2018-04-20 03:34:28 +02:00
Aleix Pol 77049d3b80 Android: include metadata for okular kirigami
Summary:
Include an AndroidManifest.xml file so when it's installed it has a
proper icon and name.
Include appdata information so it can be listed

Reviewers: #okular, mart, aacid

Reviewed By: #okular, mart, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12299
2018-04-19 01:05:54 +02:00
Marco Martin 71f870836e upport high dpi 2018-04-18 16:57:27 +02:00
Marco Martin af1aef4e6f set the context properties the app expects 2018-04-18 15:46:34 +02:00
Albert Astals Cid 47836646d7 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-17 00:39:32 +02:00
Ahmad Osama 6a2ed4f314 [Okular] Bug 387282: Highlighting of search results lost when rotating page
Summary:
The highlights were removed when rotating the page, also the RotaionJob::rotationMatrix function was not rotating the Highlihgts correctly.
I removed the deletion and modified the rotaionMatrix function by making it shorter and adding a translation after the rotatin. I tried different rotations and they are working fine.
BUG: 387282

Reviewers: #okular

Subscribers: aacid, ngraham, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D11901
2018-04-17 00:39:02 +02:00
Aleix Pol c325b342f3 Make some frameworks optional so okular can be built on Android
Summary:
Disables KWallet integration if there's no KWallet, KJS if there's no
KJS and KDocTools.
Here's a list of frameworks that don't work on Android:
https://cgit.kde.org/sysadmin/ci-tooling.git/tree/local-metadata/project-ignore-rules.yaml

Test Plan: Still works locally, ran Okular and Okular Mobile on Android.

Reviewers: #okular, aacid

Subscribers: aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12177
2018-04-16 22:41:19 +02:00
Aleix Pol 5f8f84d53c Turn okularkirigami into an executable
Summary:
Makes for straightforward Android testing and will work on normal
installations as well.

Reviewers: #kirigami, #okular, mart

Reviewed By: #kirigami, mart

Subscribers: plasma-devel

Tags: #kirigami, #okular

Differential Revision: https://phabricator.kde.org/D12176
2018-04-13 18:26:34 +02:00
Aleix Pol 4d19b4a8d7 No need to link to okularpart
It's wrong to link against plugins anyway.
2018-04-13 17:46:12 +02:00
Aleix Pol aae8baf2d0 Only compile FileKeeper when it's necessary 2018-04-13 17:45:23 +02:00
Aleix Pol 52b62306f8 Also don't use KPty code for Android
Changed the defines to something more explicit of what's going on.
2018-04-13 17:44:50 +02:00
Aleix Pol 621e4d9cd7 Improve searching for KActivities 2018-04-13 17:35:17 +02:00
Aleix Pol c8b0677a25 Remove unneeded dependencies 2018-04-13 17:05:16 +02:00
Albert Astals Cid 8c090da4ae Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-12 18:41:48 +02:00
Albert Astals Cid 88faff5b3c Fix crash in Kile preview mode when enabling fullscreen
Does not make sese to ask the user if he wants to go fullscreen on the
kile preview widget (or the milou preview widget, the other user of this
feature), and besides not making sense, it's crashing :D

BUGS: 390383
2018-04-12 18:40:00 +02:00
Albert Astals Cid 1904f7e95e Use KCrash 2018-04-11 19:34:10 +02:00
David Edmundson 824eeb1160 Merge branch 'Applications/18.04' 2018-04-09 22:58:59 +01:00
David Edmundson 804d0bd42a Fix rubber band selection drawing contents misaligned with scaling
Summary:
in drawPixmap(source, sourceRect) the source rect is in native pixels.

In this code the size was scaled by the DPR, but the location was not.
blendRect is the contents of a selection rectangle, offset from the
bounding darker blue rectangle. Hence we haven't really noticed.

This completely fixes the rectangle when the scale == 2.0/3.0

Some smaller artifacts remain on fractional scale factors, which is a
separate code bug with the same symptoms.

CCBUG: 386111

Reviewers: aacid, rkflx

Reviewed By: rkflx

Subscribers: sander, rkflx, anthonyfieroni, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8980
2018-04-09 22:58:37 +01:00
Albert Astals Cid b62131b7ba Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-09 23:37:41 +02:00
Albert Astals Cid 0cb59caabb increase version to 1.4.x
GIT_SILENT
2018-04-09 23:36:51 +02:00
Christoph Feck e843e85ca7 GIT_SILENT Upgrade KDE Applications version to 18.04.0. 2018-04-09 22:41:59 +02:00
Albert Astals Cid f92b2b5f4f Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-08 13:00:44 +02:00
Albert Astals Cid 5ea455fe68 xps: fix file font unloading
Don't unload all fonts, only the ones this file loaded
2018-04-08 13:00:08 +02:00
Albert Astals Cid 5bb2a5c947 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-08 12:52:25 +02:00
Albert Astals Cid 985e06a2f5 Fix crash in some more xps files
Some more tweaks to path resolving.

Don't prepend a / in entryPath if path already starts with /
Fonts can also have relative paths, so use the absolutePath before
calling getFontByName

BUGS: 392826
2018-04-08 12:50:46 +02:00
Albert Astals Cid 3e25263d77 Use KCrash 2018-04-08 11:50:18 +02:00
Fabian Kosmale b25979121f use correct filepath
Summary:
Seems like someone forgot to consistently apply a change. Maybe the path
construction should be factored into a reusable lambda?

Test Plan:
Open Okular, open settings > configure Okular. Without the patch, you'll get a
"QFSFileEngine::open: No file name specified" warning, with the patch it
disappears. Note that there is also an unrelated "Illegal icon group:  7"
warning from KIconThemes, but I'm 99% certain that this is on KIconThemes doing
a bogus check in KIconEffect::apply, not on Okular

Reviewers: #okular, hetzenecker, aacid

Reviewed By: #okular, aacid

Subscribers: aacid, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12001
2018-04-07 01:15:41 +02:00
Fabian Kosmale c70485cd74 use correct filepath
Summary:
Seems like someone forgot to consistently apply a change. Maybe the path
construction should be factored into a reusable lambda?

Test Plan:
Open Okular, open settings > configure Okular. Without the patch, you'll get a
"QFSFileEngine::open: No file name specified" warning, with the patch it
disappears. Note that there is also an unrelated "Illegal icon group:  7"
warning from KIconThemes, but I'm 99% certain that this is on KIconThemes doing
a bogus check in KIconEffect::apply, not on Okular

Reviewers: #okular, hetzenecker, aacid

Reviewed By: #okular, aacid

Subscribers: aacid, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12001
2018-04-07 01:14:50 +02:00
Fabian Kosmale f8f7a77fed use correct filepath 2018-04-06 23:57:14 +02:00
Albert Astals Cid ce49b8f141 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-06 11:20:31 +02:00
Albert Astals Cid d3c89a1505 Cancel request when removing an observer
There's no need to continue generating something that won't be useful.
Also fixes a crash if the request would report partial updates since at that stage it uses the observer and that is gone
2018-04-06 11:19:23 +02:00
Albert Astals Cid 3c556f32e0 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-02 21:22:37 +02:00
Albert Astals Cid 09109dd649 Fix Presentation Mode VideoWidget sizing
This fix smells a lot like a workaround for a bug in Qt but i could not
write down a sufficiently small testcase for it to report it to Qt, and
this is not wrong anyway since we eventually add playerPage to a
layout for this. What I tracked down was that since playerPage had no
parent, at some point a nativeId for it was being created and that
broke sizing back to the default 100x30 used in Qt instead of the
size we had given it.

For some reason i needed a PDF file with more than one video to
reproduce this problem, the first video was correctly sized but the
second one was 100x30.
2018-04-02 21:21:09 +02:00
Christoph Feck 0a91e0fbee GIT_SILENT Upgrade KDE Applications version to 18.03.90. 2018-04-02 21:19:45 +02:00
Albert Astals Cid 21f2c91010 Fix crash when changing pages fast on presentation mode
The crash would happen because we were setting partial updates to true on requests
that were synchronous, because that sync request was cancelling an async one (prerender)
so now we only set newRequest partial updates to true when cancellingm another one if it's asynchronous

And a sync but with partial updates request would make stuff crash because the request
would all be processed on the main thread but generator_pdf.cpp cakks signalPartialPixmapRequest
with a queued connection so we that function was called the request would have already gone
2018-04-02 21:13:27 +02:00
Albert Astals Cid 1069b02fd3 Merge remote-tracking branch 'origin/Applications/18.04' 2018-03-21 00:31:27 +01:00