D18466: Fixed calligra crashing when opening remote document
Dag Andersen
noreply at phabricator.kde.org
Sun Jan 27 09:13:02 GMT 2019
danders added a comment.
In D18466#400507 <https://phabricator.kde.org/D18466#400507>, @niccolove wrote:
> I'm not sure on how to do that, do you have any tip?
> openDocumentInternal is called by openDocument, which is called in KoApplication just before checking the arguments. When it sees the print argument, it calls slotFilePrint. openDocumentInternal downloads the document in async. Should it be made not async, or is there another way to make it wait until the other process ends? Also, "slotLoadCanceled" is already implemented, or were you talking about something else?
Well niccolove, you have really put your hand into a bee-hive :)
The answer from anthony can be used as a test to see if the the princip works, but does not address all situations.
The current implementation needs quite a lot of change to work. These are the conditions as I see them:
1. openDocument() initiates loading and returns true if it finds the file, just return false if the file do not exist.
2. The actual loading is asynchronous if the file is remote.
3. It is possible to specify multiple files to load. (Each file will be shown in it's own main window.)
4. For writing to pdf, a file name can be specified on the command line.
These are the steps I think is needed:
1. Create slot(s) in KoApplication to handle the different resullts; print, pdf and cancelled.
2. The signal connections must be done before openDocument() is called. (So that local files also works.)
3. Add KoDocument as an arg to the KoMainWindow::loadCompleted() signal, so KoApllication knows which dcoument has been loaded.
4. For pdf, find a way to handle filename.
REPOSITORY
R8 Calligra
REVISION DETAIL
https://phabricator.kde.org/D18466
To: niccolove, danders
Cc: anthonyfieroni, boemann, Calligra-Devel-list, dcaliste, cochise, vandenoever
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20190127/f5f12c20/attachment.htm>
More information about the calligra-devel
mailing list