Commit graph

8078 commits

Author SHA1 Message Date
Henrik Fehlauer 454a53ff72 Fix testSaveAsUndoStackAnnotations autotest
Summary:
Okular allows to drop changes when saving to a file format not
supporting those. However, this is only sensible for {nav Save As},
while for {nav Save} the {nav Continue} button is not needed. When this
behaviour was introduced in 481676dced, the `jpg` test row failed
subsequently, because `closeDialogHelper` relies on the availability of
the {nav Continue} button. The `epub` test row is similar, but `returns`
early because it does not allow `canSwapBackingFile` and therefore does
not fail the test afterwards.

As the test progresses, the initial {nav Save As} (`potato.jpg` to
`/tmp/123.jpg`) is implicitly followed by {nav Save} (`/tmp/123.jpg` to
`/tmp/123.jpg`) for each subsequent `part.saveAs`. This causes the
{nav Continue} button to vanish, so eventually the test will fail.

Forcing {nav Save As} so the {nav Continue} button continues to exist
could be done in multiple ways, but just alternating between two
different files to save seems like the most efficient and most readable
approach.

Test Plan:
- `./autotests/parttest testSaveAsUndoStackAnnotations:jpg` now passes.
- Other test rows still pass.
- No changes to non-test code needed.

Reviewers: aacid, #okular

Reviewed By: aacid, #okular

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9579
2018-01-02 21:29:28 +01:00
Henrik Fehlauer 9f0aa37906 Document ".okular" filename extension
Summary:
In general Okular makes it very hard to get the filename extension for
document archives wrong when saving. Still it would be nice to document
this.

BUG: 291176

Test Plan: `meinproc5` still happy.

Reviewers: lueck, yurchor

Reviewed By: yurchor

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9577
2018-01-01 08:41:09 +01:00
l10n daemon script e7b43fd0c3 GIT_SILENT made messages (after extraction) 2017-12-31 05:26:50 +01:00
l10n daemon script 4af533a4eb GIT_SILENT made messages (after extraction) 2017-12-31 03:15:40 +01:00
l10n daemon script 26450b97e6 GIT_SILENT made messages (after extraction) 2017-12-28 05:17:11 +01:00
l10n daemon script d150c10bce GIT_SILENT made messages (after extraction) 2017-12-28 03:13:34 +01:00
Albert Astals Cid e371292a37 Merge remote-tracking branch 'origin/Applications/17.12' 2017-12-15 00:32:46 +01:00
Albert Astals Cid 9504d91c61 Don't call m_formsMessage->setVisible( true ) on unsetDummyMode
The only reasons to show m_formsMessage are on openFile if we have forms (to show the toggle button) or if we have xfa forms (unsuppported warning)
2017-12-15 00:32:03 +01:00
Albert Astals Cid 4fc203076b Code simplification
No need to use d->m_loadedGenerators to find the generator since we already have m_generator
2017-12-14 14:33:18 +01:00
Albert Astals Cid 22662af229 Merge remote-tracking branch 'origin/Applications/17.12' 2017-12-05 23:09:24 +01:00
Albert Astals Cid 4e6c9f8f7a Fix crash when accessing text page after save
text page was storing a pointer to a PagePrivate pointer but those die
after saving so we need to store a Page pointer since those are stable.

BUGS: 387247
2017-12-05 23:07:10 +01:00
David Faure ee2418be1d Re-enable -DQT_NO_URL_CAST_FROM_STRING and fix the CHM backend. 2017-12-05 09:48:40 +01:00
Albert Astals Cid 80b1b67ab9 Merge remote-tracking branch 'origin/Applications/17.12' 2017-12-05 01:00:51 +01:00
Albert Astals Cid 26367babb4 Unbreak compilation of the chm backend
CCMAIL: faure@kde.org
2017-12-05 00:57:04 +01:00
Albert Astals Cid 2b7b8e94f8 We broke ABI by adding a new virtual to generator 2017-12-05 00:53:34 +01:00
Albert Astals Cid deb01dce88 Increase version now that we're not on unstable versioning anymore 2017-12-05 00:30:48 +01:00
Christoph Feck 2f77b3294d GIT_SILENT Upgrade KDE Applications version to 17.12.0. 2017-12-05 00:03:16 +01:00
l10n daemon script ad559c5d93 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"
2017-12-04 06:13:21 +01:00
l10n daemon script f8cf8acd7c GIT_SILENT made messages (after extraction) 2017-12-04 05:19:54 +01:00
l10n daemon script c5bb0a0941 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"
2017-12-04 04:43:49 +01:00
l10n daemon script bbf4bd0bdc GIT_SILENT made messages (after extraction) 2017-12-04 03:08:25 +01:00
Albert Astals Cid 4d49518845 Merge remote-tracking branch 'origin/Applications/17.12' 2017-12-03 20:51:55 +01:00
Nathaniel Graham da89a035c1 Use a distinct and more appropriate icon for Layers
Summary: BUG: 387424

Test Plan:
Tested in KDE Neon. Before, using Breeze icons:
{F5517757}

After, using Breeze icons:
{F5523390}

Before, using Oxygen icons:
{F5523394}

After, using Oxygen icons:
{F5523395}

Reviewers: aacid, #okular

Reviewed By: aacid, #okular

Subscribers: rkflx

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9043
2017-12-03 09:20:59 -07:00
l10n daemon script 78dc6e4d95 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"
2017-12-03 06:11:47 +01:00
l10n daemon script a321a9ed68 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"
2017-12-03 04:48:09 +01:00
David Faure 591f200f33 Merge branch 'Applications/17.12' 2017-12-02 21:13:35 +01:00
David Faure 711e4e75ef Enable -DQT_NO_URL_CAST_FROM_STRING and fix compilation 2017-12-02 21:12:47 +01:00
l10n daemon script 066805c550 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"
2017-12-01 04:51:24 +01:00
l10n daemon script 22885c00b0 GIT_SILENT made messages (after extraction) 2017-12-01 03:10:28 +01:00
Christoph Feck 27b8c8cc27 GIT_SILENT Upgrade KDE Applications version to 17.11.90. 2017-11-30 22:20:28 +01:00
Henrik Fehlauer 069a18b041 Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-30 15:00:26 +01:00
Henrik Fehlauer dccd83783d Prevent Okular from crashing when synctex logs an error
bd20e48c3c updated Okular's copy of the synctex code to 1.19.
Unfortunately since this version the upstream code logs errors like
`"! SyncTeX Error : Ignored record...` when accessing selected synctex
files created with older versions of synctex.

The upstream `_synctex_log` contains `va_list arg` as a parameter, but
fails to initialize and tear down this properly via `va_start` and
`va_end`. In general this seems to work for the single argument case.
However, once we apply our hardening patch to get rid of the
`gnu_printf format attribute` warning and thus introduce a variadic
argument, things go wrong.

To fix this, we add the missing code. The remaining changes are just
refreshing the patches.

BUG: 383915

Test Plan:
Opening `empty.pdf` with `empty.synctex.gz` from
https://bugs.kde.org/attachment.cgi?id=109116 located
in the same folder does not lead to Okular segfaulting anymore.
2017-11-30 14:57:05 +01:00
Henrik Fehlauer b6573a2713 Change whitespace in synctex patches
15-prevent-leaks-and-segfault.diff did not apply cleanly with quilt.
After fixing this, some of the other patches needed a refresh.
2017-11-30 12:45:58 +01:00
l10n daemon script 02a4cfb26a 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"
2017-11-28 06:52:56 +01:00
l10n daemon script 0ef249b5a5 GIT_SILENT made messages (after extraction) 2017-11-28 05:48:07 +01:00
l10n daemon script 42650e4f27 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"
2017-11-28 05:07:33 +01:00
l10n daemon script 379edd6757 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"
2017-11-27 07:00:46 +01:00
l10n daemon script cdf2921e32 GIT_SILENT made messages (after extraction) 2017-11-27 05:54:12 +01:00
l10n daemon script 863ae954a7 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"
2017-11-27 05:02:58 +01:00
l10n daemon script 3cbcc9b521 GIT_SILENT made messages (after extraction) 2017-11-27 03:15:29 +01:00
David Edmundson ab433f701a Fix highlight/annotation clipping with Qt scaling
Summary:
pixelValue/pixelValue will give us a normalised value.

Normalised values shouldn't be modified by a device pixel ratio.
We want scaledRect not dScaledRect.

BUG: 386110

Test Plan:
Searched for text. Zoomed in, panned about
Created annotations, they still seemed to work

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8832
2017-11-23 23:29:47 +00:00
David Edmundson 1a3dc7d8e0 Fix highlight/annotation clipping with Qt scaling
Summary:
pixelValue/pixelValue will give us a normalised value.

Normalised values shouldn't be modified by a device pixel ratio.
We want scaledRect not dScaledRect.

BUG: 386110

Test Plan:
Searched for text. Zoomed in, panned about
Created annotations, they still seemed to work

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8832
2017-11-23 23:04:16 +00:00
l10n daemon script 22ee80d317 GIT_SILENT made messages (after extraction) 2017-11-21 05:09:38 +01:00
l10n daemon script 3e2e5d2b36 GIT_SILENT made messages (after extraction) 2017-11-21 02:59:25 +01:00
Albert Astals Cid 6c9659d0a2 Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-20 14:53:50 +01:00
Albert Astals Cid 559836c392 Give warnings when the file is modified externally
Summary:
Unfortunately, poppler (the only backed that supports saving) is not able
to save properly if the file is modified by a third party while it is opened

So we give the user a warning saying things went wrong and give him the option
to not reload/close, that way if there was something very important in the annotations
she added she can try to save them (even if by copy&paste the contents to a third program)

Reviewers: rkflx

Reviewed By: rkflx

Subscribers: ngraham, rkflx, ltoscano, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8863
2017-11-20 14:53:17 +01:00
Heiko Becker 8502c41a9c Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-19 20:53:41 +01:00
Heiko Becker f099d5fa2a generators: Use a specific description for libzip
Summary:
It appears it's copied and pasted from LibCHM and while it's indeed
needed to support displaying CHM files, it's a library of its
own.

Reviewers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8879
2017-11-18 12:22:43 +01:00
l10n daemon script 7eaa3cb659 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"
2017-11-17 06:38:51 +01:00
l10n daemon script d6e1a6808d GIT_SILENT made messages (after extraction) 2017-11-17 05:44:04 +01:00