Use KListOpenFilesJob for retrieving apps blocking unmount
Needs ReviewPublic

Authored by hallas on Nov 3 2019, 8:22 AM.

Details

Reviewers
broulik
bruns
Group Reviewers
Frameworks
Summary

Use the KListOpenFilesJob class from KCoreAddons to retrieve the
applications that are blocking an unmount. The KListOpenFilesJob is a
generalized version of the code here.

Test Plan

Insert a USB stick
Open a file from the USB stick
Remove the USB stick using the Device Notifier
Notice the error message

Diff Detail

Repository
R120 Plasma Workspace
Branch
use_klistopenfilesjob (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18455
Build 18473: arc lint + arc unit
hallas created this revision.Nov 3 2019, 8:22 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 3 2019, 8:22 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hallas requested review of this revision.Nov 3 2019, 8:22 AM
hallas added a comment.Nov 3 2019, 8:25 AM

Note that I haven't tested this patch locally because I don't know how to "run" the locally compiled devicenotifier. I can see that I get a plasma_engine_devicenotifications.so library from building the project, but I don't know how to "run" it, do we have a cli tool to load the shared library for testing? Or how do you guys test?

Set QT_PLUGIN_PATH to you local path with plugin after that set the system path for others
QT_PLUGIN_PATH=/local/path:/system/path executable

dataengines/devicenotifications/ksolidnotify.h
50

This is public signal, are you sure none use it?

Set QT_PLUGIN_PATH to you local path with plugin after that set the system path for others
QT_PLUGIN_PATH=/local/path:/system/path executable

Thanks for the info :) But what executable would load the plugins? Would I have to set the QT_PLUGIN_PATH globally on my system, and use my installed kde to test? Or do we have a command line tool to load these plugins?

dataengines/devicenotifications/ksolidnotify.h
50

I think ;) As far as I can tell this is an internal class so it's API is not exported. I have also done a git grep in the plasma-workspace repository for any users, but I have found none.