[Places Runner] Fix opening devices
ClosedPublic

Authored by broulik on Jul 2 2018, 8:40 AM.

Details

Summary

The codepath for opening devices was never actually entered as always a QUrl was set as data.
This resulted in errors like "Cannot open URL /org/freedesktop/someudi".
Moreover, for some reason the run() code created a new KFilePlacesModel but since devices are added delayed, searching for a device in the model right after creation doesn't work.
The code is adjusted to use the one KFilePlacesModel instance in the helper, since run() is executed on the main thread anyway.

Test Plan

5.12 branch?

Typed "500", got my "500 MiB" test partition listed, clicked it, it would mount and then open
Opening other locations like "Projects" still works fine

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jul 2 2018, 8:40 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 2 2018, 8:40 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jul 2 2018, 8:40 AM
mart accepted this revision.Jul 2 2018, 9:12 AM
This revision is now accepted and ready to land.Jul 2 2018, 9:12 AM
This revision was automatically updated to reflect the committed changes.