D21760: Add KListOpenFiles::listProcessesWithOpenFiles
David Hallas
noreply at phabricator.kde.org
Wed Jun 12 10:29:11 BST 2019
hallas added a comment.
First of, this is WIP, I just wanted to share this early to get some feedback. The reasoning for this is to generalize functionality for running `lsof`, this is currently in use by the Device Notifier applet and I would like to use it in Dolphin to fix bug #189302. Also see the discussion in D19989 <https://phabricator.kde.org/D19989> for details.
INLINE COMMENTS
> klistopenfilestest.cpp:31
> +
> +void KListOpenFilesTest::testOpenFiles()
> +{
Most of these tests wont work on Windows, so I need to fix that
> klistopenfiles.cpp:49
> + });
> + p->start(QStringLiteral("lsof"), {QStringLiteral("-t"), QStringLiteral("+d"), path.path()});
> +}
What should we do for Windows? Do we support any other platforms that doesn't have lsof?
> klistopenfiles.h:40
> + */
> +KCOREADDONS_EXPORT void listProcessesWithOpenFiles(QDir path, Callback callback);
> +
I am very much in doubt about what a nice interface for this should be? I was thinking of an alternative approach where you would instantiate a class, connect to a signal on the class and then invoke a method to start the listing process, you would then receive the result on a slot instead. What do you guys think?
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D21760
To: hallas, davidedmundson, broulik
Cc: kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190612/85fafbc2/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list