The the original unique name was empty. Otherwise we can't find the annotation after save/reload because the annotation name is still empty and a new random id is assigned
We don't need to delete the threadweaver job, threadweaver does it by itself,
and if we call deleteLater it may happen that the main thread deletes it
and then when the threadweaver thread tries to call the delete things are
gone and it goes kaboom
BUGS: 382725
Summary:
so that pixmap generation gets a chance to start before the text generation
This makes that on files where both the text generation and the pixmap generation
are slow at least we see something "as fast as possible" since only either text generation
or pixmap generation threads run at the same time
Reviewers: #okular, mlaurent
Reviewed By: mlaurent
Subscribers: michaelweghorn, dvratil, mlaurent, #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8378
It was only used in tests as a way to "hide" warning dialogs, now we have a proper way to
close them, this way we make sure that dialogs are should when they should not not when they should not
Summary:
FEATURE: 355283
The principle is simple. This patch enables overriding the default columns for Overview mode, if the document is small. For example, if document has 1 or 2 pages and the default columns in Okular settings is 3, Overview mode will enable 1 or 2 columns for better UX
Reviewers: #okular, rkflx, ngraham
Reviewed By: rkflx, ngraham
Subscribers: ltoscano, aacid, rkflx, ngraham
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8385
Example, png files.
If you add an annotation and save and choose to lose changes, the annotation will still be around "in okular" but not on the file, so we need to mark the file as modified so that when the user tries to close he will get again the warning of "you're trying to save and will lose data" because otherwise the user may think the annotation actually was saved since he can see it
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
Just use m_ff and cast it when needed.
This will make it easy in the future when the given form for a widget may change so we only need to update one value