Discussion:
D16967: Add Documents shortcut detection
Andrew Crouthamel
2018-11-18 04:55:39 UTC
Permalink
acrouthamel created this revision.
acrouthamel added a reviewer: Dolphin.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
acrouthamel requested review of this revision.

REVISION SUMMARY
This adds support for Documents detection when included as a default
as implemented in D10245 <https://phabricator.kde.org/D10245>. This is a work-in-progress and currently
does not succeed.

Assistance is welcome.

TEST PLAN
Run ctest within the dolphin build directory.

REPOSITORY
R318 Dolphin

BRANCH
add-documents (branched from master)

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

AFFECTED FILES
src/tests/placesitemmodeltest.cpp

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Andrew Crouthamel
2018-11-18 04:56:36 UTC
Permalink
acrouthamel added a dependency: D16852: Add Documents to the default list of Places.

REPOSITORY
R318 Dolphin

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

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Andrew Crouthamel
2018-11-18 04:57:49 UTC
Permalink
acrouthamel edited the summary of this revision.

REPOSITORY
R318 Dolphin

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

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Andrew Crouthamel
2018-11-18 04:59:49 UTC
Permalink
acrouthamel added a comment.


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)]

REPOSITORY
R318 Dolphin

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

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Elvis Angelaccio
2018-11-18 10:04:47 UTC
Permalink
elvisangelaccio added a comment.


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 <https://phabricator.kde.org/D16852> applied?

REPOSITORY
R318 Dolphin

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

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-19 03:46:09 UTC
Permalink
ngraham added a comment.


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

REPOSITORY
R318 Dolphin

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

To: acrouthamel, #dolphin
Cc: elvisangelaccio, kfm-devel, ngraham, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Loading...