D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
This revision was automatically updated to reflect the committed changes. Closed by commit R241:2353119aae8f: Fix KIO::mkpath with qtbase 5.10 beta 4 (authored by elvisangelaccio). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D8836?vs=22433&id=22436 REVISION DETAIL https://phabricator.kde.org/D8836 AFFECTED FILES src/core/mkpathjob.cpp To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
dfaure accepted this revision. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
elvisangelaccio edited the summary of this revision. elvisangelaccio edited the test plan for this revision. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
elvisangelaccio marked 2 inline comments as done. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
elvisangelaccio updated this revision to Diff 22433. elvisangelaccio added a comment. - Use local variables REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D8836?vs=22432&id=22433 BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 AFFECTED FILES src/core/mkpathjob.cpp To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
dfaure added inline comments. INLINE COMMENTS > mkpathjob.cpp:46 > for (; i < basePathComponents.count() && i < > m_pathComponents.count(); ++i) { > if (m_pathComponents.at(i) == basePathComponents.at(i)) { > +if (m_url.path() == QLatin1Char('/')) { I think it's time to put m_pathComponents.at(i) into a local variable ;-) > mkpathjob.cpp:65 > +QString testDir; > +if (m_url.toLocalFile() == QLatin1Char('/')) { > +testDir = m_url.toLocalFile() + m_pathComponents.at(i); same here with m_url.toLocalFile() REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
elvisangelaccio updated this revision to Diff 22432. elvisangelaccio added a comment. - Fix also mkpathjobtest and fileundomanagertest REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D8836?vs=22430&id=22432 BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 AFFECTED FILES src/core/mkpathjob.cpp To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
dfaure accepted this revision. dfaure added a comment. This revision is now accepted and ready to land. Urgh. That QUrl change doesn't make things easy for this type of code indeed. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
dfaure added a reviewer: thiago. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D8836 To: elvisangelaccio, #frameworks, dfaure, thiago
D8836: Fix KIO::mkpath with qtbase 5.10 beta 4
elvisangelaccio created this revision. elvisangelaccio added reviewers: Frameworks, dfaure. Restricted Application added a project: Frameworks. REVISION SUMMARY The latest Qt 5.10 beta includes [1] which breaks KIO all over the place, 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. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D8836 AFFECTED FILES src/core/mkpathjob.cpp To: elvisangelaccio, #frameworks, dfaure