D28909: smb: port to Result system to force serialization of error/finish condition

Harald Sitter noreply at phabricator.kde.org
Fri Apr 17 11:39:07 BST 2020


sitter created this revision.
sitter added a reviewer: dfaure.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
sitter requested review of this revision.

REVISION SUMMARY
  the Result system was originally introduced to the FTP slave and now also
  makes an appearance in the SMB slave. the system introduces a separation
  between logic and fronting API class to more tightly control when state
  changing calls (finished()/error()) are made. since these calls may only
  be made once during a given command multiple calls are at the very least
  indicative of bad code and at worst cause severe state confusion for the
  slavebase that it won't be able to recover from, rendering the slave
  instance broken.
  
  in the internal class Results are returned whenever an error can appear and
  these Results must be handled in some form. the only way to effectively
  produce user visible errors is to forward results up the call chain.
  
  this is also introducing scopeguards for file descriptors to simplify
  error condition returning (i.e. not having to worry about closing the fd
  manually). as a result we now require Qt 5.12 (which we do via KF5.66
  anyway, albeit implicitly)

TEST PLAN
  - copy, lots and lots of copy
  - rename
  - delete

REPOSITORY
  R320 KIO Extras

BRANCH
  smb-result

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

AFFECTED FILES
  CMakeLists.txt
  smb/kio_smb.cpp
  smb/kio_smb.h
  smb/kio_smb_auth.cpp
  smb/kio_smb_browse.cpp
  smb/kio_smb_config.cpp
  smb/kio_smb_dir.cpp
  smb/kio_smb_file.cpp
  smb/kio_smb_mount.cpp

To: sitter, dfaure
Cc: kde-frameworks-devel, kfm-devel, azyx, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200417/1cb910eb/attachment.htm>


More information about the kfm-devel mailing list