D25980: [KAutoSaveFile] Use QUrl::path() instead of toLocalFile()

Ahmad Samir noreply at phabricator.kde.org
Sat Dec 14 09:07:34 GMT 2019


ahmadsamir created this revision.
ahmadsamir added reviewers: Frameworks, mpyne, dfaure, mardelle.
Herald added a project: Frameworks.
ahmadsamir requested review of this revision.

REVISION SUMMARY
  In staleMatchesManaged() using toLocalFile() means that it'll fail
  for remote files, e.g. fish://user@example.com/home/remote/test.txt .
  Use path() instead.
  
  This fixes kautosavefiletest.
  
  Note that running that unit test gives:
  KAutoSaveFileTest::test_locking() org.kde.kcoreaddons: Could not lock file: "/home/ahmad/.local/share/stalefiles/qttest/test.txtEQofish_%2Fhome%2FremotexOzeiEQo"
  
  But the same happens when building from commit 88d1909 <https://phabricator.kde.org/R244:88d190934b92dc815eb530bc5f493292b4fe400d>, so it's not related
  to the recent changes AFAICS.

TEST PLAN
  The code compiles and the unit tests pass.

REPOSITORY
  R244 KCoreAddons

BRANCH
  l-tolocalfile-path (branched from master)

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

AFFECTED FILES
  src/lib/io/kautosavefile.cpp

To: ahmadsamir, #frameworks, mpyne, dfaure, mardelle
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191214/49a13907/attachment.html>


More information about the Kde-frameworks-devel mailing list