D10414: Add move semantics support to KIO::UDSEntry.

Mark Gaiser noreply at phabricator.kde.org
Sat Feb 10 13:24:06 UTC 2018


markg added a comment.


  @dfaure i can make the test much more complete if you want.. But it's more complex thus i left it out.
  I can store the UDSEntry in a QDataStream which would be backed by a QByteArray. That can be hashed!
  Then i can do the same after moving operations and compare the hash. That way i would know for sure the UDSEntry objects match perfectly.
  
  But as said, that is more complex. I'd probably make a lambda within the testMove() function. I think with a signature like this:
  auto udsEntryHash = [](const KIO::UDSEntry &entry){
  // some foo..
  return hash; (would be the QCryptographicHash::result() output).
  };
  
  Your call :)
  
  Or i can add that as a separate test that just tests UDSEntry copy and move operations. That might actually be better and more generic.
  Do note that this doesn't fix or catch anything at the moment. It would just be an extra test to guarantee copying of UDSEntry objects is not broken.

REPOSITORY
  R241 KIO

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

To: markg, dfaure
Cc: apol, #frameworks, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180210/d02db2b3/attachment.html>


More information about the Kde-frameworks-devel mailing list