Commit graph

176 commits

Author SHA1 Message Date
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 bd57b36c83 Add TODO for the future to fix requestFontData function 2020-07-11 07:50:05 +02:00
Laurent Montel 516fb89d94 Use camelcase include. (scripted) 2020-07-08 13:54:37 +02:00
Albert Astals Cid 93540ac16d Enable most of clazy level2 2020-02-21 14:57:48 +01:00
Albert Astals Cid 91bce4a0a3 Enable clazy const-signal-or-slot 2020-02-20 12:42:23 +01:00
Albert Astals Cid 0a2287be19 CI: Enable two readability clang-tidy checks
Use jq to filter compile_commands.json to not include the compilation of
autogenerated files, we don't want to check those

Also filter out the synctex folder, since that is imported code
2019-12-23 12:06:49 +01:00
Albert Astals Cid c549acaab0 Move the Q_PRIVATE_SLOTS to lambda connections
Some of the invokeMethods with a queued connection get changed with a
QTimer::SingleShot with 0 which has the same behaviour
2019-12-20 16:42:58 +01:00
Albert Astals Cid 78cf6bd910 CI: enable more modernize checks
Since unfortunately some of the autogenerated includes don't pass the
checks we do a trick of building out of source and then specifying the
.*/okular/.* path as the only includes we care about
2019-12-18 12:51:13 +01:00
Laurent Montel 563c8b3465 Fix spectre genrator after my clean forward 2019-06-04 07:12:42 +02:00
Laurent Montel 9f90e14dd1 Fix forward declaration 2019-06-03 08:48:32 +02:00
Yuri Chornoivan 3832a6522f Update Okular developer documentation
Differential Revision: https://phabricator.kde.org/D17801
2019-02-07 08:13:11 +02:00
Albert Astals Cid 7254c1826c K_PLUGIN_FACTORY_WITH_JSON -> K_PLUGIN_CLASS_WITH_JSON
Now that we require KF5 5.44
2019-01-07 00:56:08 +01:00
Yuri Chornoivan 6102c65d6e Minor fixes to API docs 2018-11-20 19:43:11 +02:00
Yuri Chornoivan 5478b2ec92 Fix minor typos 2018-11-14 21:12:15 +02:00
Yuri Chornoivan 2f014ccd20 Fix minor EBN issues 2018-10-18 22:04:49 +03:00
Yuri Chornoivan 39b6e8147d Fix minor EBN issues 2018-09-01 11:25:57 +03:00
Yuri Chornoivan c04ca1fa96 Fix minor EBN issues 2018-08-31 12:23:45 +03:00
Albert Astals Cid 2d8b2c7e95 Add support for cancellable image rendering and text extraction
Summary:
Only supported by the pdf backend if using poppler >= 0.63

Sadly had to change the generator API

Text cancellation is a bit wobbly still since poppler has large parts
of the code where doesn't check for the cancellation flag, but that
is something that will get automagically fixed for us if the poppler
side is improved

Test Plan: Needs https://bugs.freedesktop.org/show_bug.cgi?id=104263

Reviewers: ervin, rkflx

Reviewed By: ervin, rkflx

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9328
2018-02-01 22:53:28 +01:00
Albert Astals Cid 3957683d76 Merge branch 'dont-use-docdata-for-annots-and-forms' into Applications/17.12 2017-11-16 15:00:23 +01:00
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid e29892fda4 some review tweaks 2017-11-15 11:20:25 +01:00
Albert Astals Cid a2f5560c00 PDF: Support the poppler 0.62 renderToImage with update callback
Summary:
This way pages that take more than 500ms to render get updated every so often so that the
user can see that the program didn't hang, it's just that it's taking long to render

Tags:
incremental rendering, partial updates

BUGS: 344081

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8379
2017-11-09 17:28:54 +01:00
Albert Astals Cid 099d3cfcc8 Update @since to 1.3
Let's see if we can squeeze it in
2017-11-06 06:10:13 +01:00
Albert Astals Cid ca5422d0e9 Implement swapBackingFile for the PDF backend
How does it work:
 * What it does is really closing and opening the file again through poppler
 * This means that things that are generated in "open" time like Page, Rects, Annotations, Forms need to be updated
	* For Page what we do is swap the PagePrivate so that other classes that hold Page* don't break
		* Since some parts of the PagePrivate can be reused, we move them in PagePrivate::adoptGeneratedContents
	* For all the commands in the undo stack we need to update the annotations/forms it refers to, added a new function to do that
	* The annotationmodel needs updating it's pointers
	* The widgets for the forms are reused and their form* updated
	* the widgets for the videos are recreased since videos don't really hold much content (you lose the playing status on save but i think that's acceptable)

TODO: Make this work for .okular files
TODO: For files with password we will need to reload the file, asking for the password again and thus losing the undo stack, warn the user
TODO: autotests
2017-10-26 15:30:44 +02:00
Albert Astals Cid 04ed10d3ea Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
Albert Astals Cid 1d2dd42c67 no need for & here 2017-03-02 22:45:45 +01:00
Albert Astals Cid 519f0acac7 document which variant kind is returned 2017-03-02 22:23:41 +01:00
Albert Astals Cid ec70995895 QString as key is evil, add a nice enum 2017-03-02 21:04:59 +01:00
Albert Astals Cid b50aff3ed7 Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
Albert Astals Cid 2868e3e5ca Support SetOCGState links
Needs a very recent poppler

BUGS: 368402
REVIEW: 129216
2016-11-26 16:00:46 +01:00
Alex Richardson 2f9246ae42 Port to new JSON plugin loading system
This means Okular can now work without ksycoca and KDELibs4Support.

REVIEW: 126193
2016-01-04 15:59:07 +01:00
Albert Astals Cid 8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Albert Astals Cid 1cd101b480 Small cleanup of the layer support feature
Tab replacing, function naming, include removal, @since addition, etc
2015-09-15 01:38:09 +02:00
Montel Laurent 6fab218de9 Use Q_NULLPTR 2015-08-18 15:12:07 +02:00
Saheb Preet Singh bf673495fb added layers on the left sidebar 2015-05-27 19:26:56 +05:30
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Montel Laurent 17a55c6dab Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	CMakeLists.txt
	core/document.cpp
	generators/poppler/CMakeLists.txt
	generators/poppler/generator_pdf.cpp
	generators/poppler/generator_pdf.h
2014-10-09 07:34:35 +02:00
Albert Astals Cid d95efa7698 Move synctex up to the core from poppler generator
This way dvi and any other potential user gets it for free

The diff is huge, but the synctex files are just moves.

And the code in core/ is also mostly just a move from the generator_pdf.cpp code

Acked by Luigi

REVIEW: 120311
2014-10-09 00:17:53 +02:00
Montel Laurent 17b7049c69 Fix includes 2014-10-08 13:48:01 +02:00
Frederik Gladhorn dad6936896 Bring back the txt generator 2014-09-17 23:52:52 +02:00
Frederik Gladhorn e28dbc6c00 Port to QMime
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Albert Astals Cid 4335b6e509 douc++ 2014-09-09 11:44:33 +02:00
Fabio D'Urso 288f87f1a5 Merge branch 'master' into dont-use-docdata-for-annots-and-forms
Conflicts:
	core/document.cpp
	core/document_p.h
	part.cpp
	part.h
2014-09-08 14:58:55 +02:00
Frederik Gladhorn b79e706e56 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	generators/dvi/generator_dvi.cpp
	generators/ooo/generator_ooo.cpp
	part.cpp
	shell/main.cpp
	shell/shell.cpp
	shell/shell.h
	shell/shellutils.h
	tests/CMakeLists.txt
	ui/propertiesdialog.cpp
2014-08-14 13:35:43 +02:00
Albert Astals Cid f76184cb55 Revert e96dabc467
Diggory i think there was a misunderstanding in our discussion

The patch is unfinished (not goot to commit with a TODO)
and needs to be improved (need to find a way to not break ABI, QSize param should be const &) please
open a reviewrequest and we can discuss/finalize it there.

CCMAIL: diggory.hardy@unibas.ch
2014-08-13 21:07:32 +02:00
Diggory Hardy e96dabc467 Fix font size on high-DPI displays in ePub documents (but makes images small) 2014-08-13 18:54:30 +02:00
Vishesh Handa e038950f50 KIcon -> QIcon 2014-08-13 11:54:49 +02:00
Vishesh Handa e4a4d400c3 Port the poppler generator 2014-08-13 11:16:28 +02:00
Albert Astals Cid e9e3d4a435 Make documentInfo be Hash based instead of XML based 2014-08-10 22:38:13 +02:00
Frederik Gladhorn 0c7a45c7a5 Disable lots of stuff and compile
The text generator is the only one compiled now.
This version links for me but then doesn't find its KPart on startup.

TTS has been completely disabled as well as some other things like the
about dialog.
2014-08-10 14:42:54 +02:00