D14757: Warn user before copy operation if available space is not enough

Pino Toscano noreply at phabricator.kde.org
Sun Aug 12 09:41:30 BST 2018


pino requested changes to this revision.
pino added a comment.
This revision now requires changes to proceed.


  Also, considering this is in a job in `KIOCore` (i.e. non-gui library), I suspect that using a message box directly is the wrong way to do it. Most probably you need to use the UI delegate of the job for this.

INLINE COMMENTS

> CMakeLists.txt:146
>   KF5::Service
> + KF5::WidgetsAddons
>   Qt5::Network

This is a private dependency, so it must go to the `PRIVATE` section of `target_link_libraries`.

> copyjob.cpp:66
>  
> -
>  #include <QLoggingCategory>

Unneeded change.

> copyjob.cpp:890
> +        if (m_totalSize > m_freeSpace) {
> +            KMessageBox::warningYesNo(nullptr, i18n("You do not have sufficient space available. Do you still want to continue?"));
> +        }

The return value of `KMessageBox::warningYesNo` is ignored, so this will continue regardless of the user choice.
Also, the message itself is not informative enough: what are the space needed, and the space available? And which directory for?

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D14757

To: shubham, broulik, ngraham, pino
Cc: pino, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180812/066d61c6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list