D14072: Don't try to restore invalid user places

David Faure noreply at phabricator.kde.org
Sun Oct 7 17:27:22 BST 2018


dfaure added a comment.


  This commit breaks kfileplacesmodeltest.
  
  $ bin/kfileplacesmodeltest testInitialState testInitialList testInternalBookmarksHaveIds
  
  - Start testing of KFilePlacesModelTest *********
  
  Config: Using QtTest library 5.12.0, Qt 5.12.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.3.1 20180323 [gcc-7-branch revision 258812])
  QDEBUG : KFilePlacesModelTest::initTestCase() 18:21:44.046 kfileplacesmodeltest(22234) ?[32mSolid::Backends::Fake::FakeManager::parseMachineFile?[0m void Solid::Backends::Fake::FakeManager::parseMachineFile() Parsing fake computer XML:  "/d/kde/src/5/frameworks/kio/autotests/fakecomputer.xml"
  
  PASS   : KFilePlacesModelTest::initTestCase()
  PASS   : KFilePlacesModelTest::testInitialState()
  PASS   : KFilePlacesModelTest::testInitialList()
  FAIL!  : KFilePlacesModelTest::testInternalBookmarksHaveIds() '!ids.contains(id)' returned FALSE. (Duplicated ID found!)
  
    Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesmodeltest.cpp(315)]
  
  PASS   : KFilePlacesModelTest::cleanupTestCase()
  Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 75ms
  
  - Finished testing of KFilePlacesModelTest *********
  
  I have debugged it a little bit but I don't really understand the overall logic.
  
  Many bookmarks have a UDI (like /org/kde/solid/fakehw/fstab/thehost/solidpath) and no URL, and those are the ones that are duplicated now.
  
  When this code is called again, those bookmarks are now skipped in the first iteration, and therefore added by the next foreach (the one which says "Add bookmarks for the remaining devices, they were previous unknown").
  
  Maybe this skipping should only be done for bookmarks with an empty UDI?

REPOSITORY
  R241 KIO

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

To: jtamate, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181007/b4336345/attachment.html>


More information about the Kde-frameworks-devel mailing list