Review Request 109700: Make KoProgressProxy (re)usuable without KoMainWindow

Sebastian Sauer mail at dipe.org
Mon Mar 25 04:47:13 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109700/
-----------------------------------------------------------

(Updated March 25, 2013, 4:47 a.m.)


Review request for Calligra.


Changes
-------

Looks as my patch also contained a second Words related progressbar change. That wasn't supposed to be the case so fixed.


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 (updated)
-----

  libs/main/KoDocument.h 287a56d 
  libs/main/KoDocument.cpp 13e7258 
  libs/main/KoPart.cpp d1e86e5 

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/e5b4936f/attachment.htm>


More information about the calligra-devel mailing list