Add Documents shortcut detection
ClosedPublic

Authored by ngraham on Nov 18 2018, 4:55 AM.

Details

Summary

This adds support for Documents detection when included as a default
as implemented in D16852. This is a work-in-progress and currently
does not succeed.

Assistance is welcome.

Test Plan

Run ctest within the dolphin build directory.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
acrouthamel created this revision.Nov 18 2018, 4:55 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptNov 18 2018, 4:55 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
acrouthamel requested review of this revision.Nov 18 2018, 4:55 AM

I checked out the test log and see the following, yet I honestly can't figure out why it is off by one, since any line referencing hasDocumentsFolder is a ++ line for the count. Looking for help to fix this.

FAIL!  : PlacesItemModelTest::testDeletePlace() Compared lists differ at index 2.
   Actual   (places): "/home/andrew/Desktop"
   Expected (urls): "/home/andrew/Documents"
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(411)]
FAIL!  : PlacesItemModelTest::testPlaceItem(Places - Home) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testPlaceItem(Baloo - Documents) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testPlaceItem(Baloo - Today) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testPlaceItem(Devices - Floppy) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testTearDownDevice() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDefaultViewProperties(Places - Home) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDefaultViewProperties(Baloo - Documents) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDefaultViewProperties(Places - Audio) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDefaultViewProperties(Baloo - Today) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDefaultViewProperties(Devices - Floppy) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testClear() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testHideItem() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testSystemItems() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testEditBookmark() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testEditAfterCreation() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testEditMetadata() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testRefresh() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testIcons(Places - Home) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testIcons(Baloo - Documents) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testIcons(Baloo - Today) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testIcons(Devices - Floppy) Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDragAndDrop() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testHideDevices() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::testDuplicatedEntries() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]
FAIL!  : PlacesItemModelTest::renameAfterCreation() Compared values are not the same
   Actual   (m_model->count())    : 19
   Expected (m_expectedModelCount): 18
   Loc: [/home/andrew/kde/src/kde/applications/dolphin/src/tests/placesitemmodeltest.cpp(245)]

The patch looks fine and works for me: the upatched test fails, the patched one passes.

Are you sure you actually have installed kio with D16852 applied?

Yep, works for me too. I suspect @elvisangelaccio has pinpointed the issue. :)

@ngraham I'm assuming this should be committed since you just committed D16852?

ngraham commandeered this revision.May 20 2019, 10:40 PM
ngraham added a reviewer: acrouthamel.

Needs changes; will make them

This revision was not accepted when it landed; it landed in state Needs Review.May 20 2019, 10:59 PM
This revision was automatically updated to reflect the committed changes.