Fix CD'ing into desktop files in plasma folder view placed inside panel
ClosedPublic

Authored by chinmoyr on Jan 3 2017, 4:37 AM.

Details

Summary

When in folder view(placed in panel) location is set to Desktop(desktop:/), clicking on a *.desktop file with Type=Link should change to the pointed directory (this is what FolderView tries to do).
Now in this context FolderModel::isDir, as expected, returns true but since FolderModel::cd uses KFileItem::isDir, it evaluates to false and directory is not changed.
So using IsDirRole in place of KFileItem::isDir can resolve this conflict.

Test Plan

Before Applying patch:
Set location to 'desktop:/'
Clicked on 'Home'
Nothing happened (neither cd nor dolphin opened)

After patch:
Set location to desktop:/
Clicked on Home
Directory changed in place and contents of home directory shown.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
chinmoyr updated this revision to Diff 9625.Jan 3 2017, 4:37 AM
chinmoyr retitled this revision from to Fix CD'ing into desktop files in plasma folder view placed inside panel.
chinmoyr updated this object.
chinmoyr edited the test plan for this revision. (Show Details)
chinmoyr added reviewers: hein, Plasma.
chinmoyr set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 3 2017, 4:37 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein accepted this revision.Jan 3 2017, 6:37 AM
hein edited edge metadata.
This revision is now accepted and ready to land.Jan 3 2017, 6:37 AM
This revision was automatically updated to reflect the committed changes.