D27504: WIP: RFC: smb faster copy to local

Harald Sitter noreply at phabricator.kde.org
Mon Feb 24 15:44:50 GMT 2020


sitter added inline comments.

INLINE COMMENTS

> hallas wrote in kio_smb_dir.cpp:49
> Yes, you could (and should ;) ) use standard C++ for this, i.e.:
> 
>   std::unique_ptr<char[]> buf;
>   buf = std::make_unique<char{}>(segmentSize);

we use c++11 so can't use make_unique and QBA seems excessive given the use. I am rather tempted to go for QVarLengthArray though, after all, technically the buf has a minimal size, so we could always put that on the stack and only alloc larger sizes on the heap. Thoughts?

> hallas wrote in kio_smb_dir.cpp:494
> What is the reason to use `QFuture` over `std::future`?

No particular reason, haven't used std::future before is all.

REPOSITORY
  R320 KIO Extras

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

To: sitter, ngraham, cfeck
Cc: hallas, anthonyfieroni, asturmlechner, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200224/f616af67/attachment.html>


More information about the Kde-frameworks-devel mailing list