Fix KIO::mkpath with qtbase 5.10 beta 4
ClosedPublic

Authored by elvisangelaccio on Nov 16 2017, 9:46 AM.

Details

Summary

The latest Qt 5.10 beta includes [1] which breaks a bunch of unit tests, since url.setPath("//foo") will now result in an invalid (empty) QUrl.

This patch fixes the KIO::mkpath() case.

[1]: http://code.qt.io/cgit/qt/qtbase.git/commit/?id=f62768d046528636789f901ac79e2cfa1843a7b7

Test Plan
  • I can now create folders from dolphin and plasma.
  • fileundomanagertest and mkpathjobtest no longer fail

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 16 2017, 9:46 AM
dfaure accepted this revision.Nov 16 2017, 9:47 AM
dfaure added a reviewer: thiago.

Urgh. That QUrl change doesn't make things easy for this type of code indeed.

This revision is now accepted and ready to land.Nov 16 2017, 9:48 AM
  • Fix also mkpathjobtest and fileundomanagertest
dfaure added inline comments.Nov 16 2017, 10:28 AM
src/core/mkpathjob.cpp
45–46

I think it's time to put m_pathComponents.at(i) into a local variable ;-)

66

same here with m_url.toLocalFile()

  • Use local variables
elvisangelaccio marked 2 inline comments as done.Nov 16 2017, 10:44 AM
elvisangelaccio edited the summary of this revision. (Show Details)Nov 16 2017, 10:51 AM
elvisangelaccio edited the test plan for this revision. (Show Details)
dfaure accepted this revision.Nov 16 2017, 10:54 AM
This revision was automatically updated to reflect the committed changes.