D17911: Fix failing knewfilemenu test and underlying reason for its failure

Nathaniel Graham noreply at phabricator.kde.org
Wed Jan 2 03:47:55 GMT 2019


ngraham created this revision.
ngraham added reviewers: Frameworks, dfaure, elvisangelaccio, aacid.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
ngraham requested review of this revision.

REVISION SUMMARY
  After ef57863a73c0e58b94f9f9f0aa1f4e918d98e79a <https://phabricator.kde.org/R241:ef57863a73c0e58b94f9f9f0aa1f4e918d98e79a>, the `knewfilemenu` test started failing. This was for three reasons:
  
  1. I forgot to run the tests, sorry about that!
  2. The test itself had an error that was being masked by the bug fixed in that commit
  3. `KIO::mkdir` is a subclass of `SimpleJob`, and is capable of creating directorties, so the previous code did not emit the correct signals because the SimpleJob condition can result in the job having its `newDirectoryURL` property set
  
  This patch fixes the above issues by correcting the bug in the test and always checking for the `newDirectoryURL` property no matter what kind of job it is.

TEST PLAN
  - All tests now pass
  - Copying files and folders still works

REPOSITORY
  R241 KIO

BRANCH
  fix-test-and-code (branched from master)

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

AFFECTED FILES
  autotests/knewfilemenutest.cpp
  src/filewidgets/knewfilemenu.cpp

To: ngraham, #frameworks, dfaure, elvisangelaccio, aacid
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190102/a4cb51c3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list