Review Request 109700: Make KoProgressProxy (re)usuable without KoMainWindow
Sebastian Sauer
mail at dipe.org
Mon Mar 25 04:41:07 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109700/
-----------------------------------------------------------
Review request for Calligra.
Description
-------
Changes:
* Introduced getter matching to thesetter for the KoProgressProxy* to KoDocument.
* Changed KoPart::openFile and KoPart::saveFile to NOT overwrite KoDocument's KoProgressProxy* if there is already one set.
* Be sure if KoPart::openFile and KoPart::saveFile set a KoProgressProxy* in KoDocument they set the KoDocument's KoProgressProxy* back to NULL once done rather then ending with a dangling pointer in KoDocument.
Motivation:
KoMainWindow is QtGui and so far handles all the progress-display logic. This patches changes that behavior to allow from outside to inject an own KoProgressProxy and not have KoDocument overwrite that again. This enables display of loading/saving progress in all non KoMainWindow-based applications like Coffice or Calligra Active. Coffice already contains some code to proper display that progress. In short: Inherit from KoProgessProxy (to be able to forward/evaluate that setValue or use it direct to fill your progressbar) and after you got the KoPart do myKoPartInstance->document()->setProgressProxy(myProgressProxyInstance). You not need to reset that later on on every load/save.
Diffs
-----
libs/main/KoDocument.h 287a56d
libs/main/KoDocument.cpp 13e7258
libs/main/KoPart.cpp d1e86e5
words/part/KWDocument.h 7654aa3
words/part/KWDocument.cpp 54cccdc
Diff: http://git.reviewboard.kde.org/r/109700/diff/
Testing
-------
Thanks,
Sebastian Sauer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130325/192c8122/attachment.htm>
More information about the calligra-devel
mailing list