KPBatchProgressDialog: Port from KDialog to QDialog

Review Request #123918 - Created May 28, 2015 and submitted

Information
Alexander Potashev
kipi-plugins
frameworks
9e7ae21...
Reviewers
kipi-plugins
Behaviour:
* Clicking "Cancel" does not reject the dialog so it is not closed. This
    is new behaviour.
* Clicking "Close" (after Cancel button changed to Close) accepts and
    closes the dialog.

Implementation details:
* The Cancel/Close button is implemented as Close button in a
    QDialogButtonBox.
* Added method setButtonClose() for turning the "Cancel" button into
    "Close" button. A plugin should call this when some error occurs and
    it cannot continue its job. Because there is nothing to cancel
    anymore, the button should be renamed to "Close".
* The Cancel/Close button has standard text/tooltip/icon/whatsthis
    defined in KF5::WidgetsAddons' KStandardGuiItem.
* The signal cancelClicked() is emitted when user clicks Cancel/Close
    like before.

The progress dialog in SendImages can be canceled (by clicking Cancel) and then closed (by clicking the same button again after it changed to "Close"). If I don't cancel it, KMail starts successfully and the Cancel button turns into Close which can then be clicked to close the dialog and remove the temporary files.

KMLExport uses KPBatchProgressDialog very poorly: it does not support canceling, and it closes the progress dialog immediately after finishing the export. The only way you can see the dialog is when your images do not contain geotags: in this case you get a messagebox on top of the progress dialog, and the progress dialog is not closed until you accept the message box. I think KMLExport needs a major bugfixing or a rewrite. So there is nothing to test in KPBatchProgressDialog with KMLExport at this point.

Alexander Potashev
Alexander Potashev
Gilles Caulier
Alexander Potashev
Alexander Potashev
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit c03c02669b42f32d7c068a5df1282ad5d269d23e by Alexander Potashev to branch frameworks.
Loading...