Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-10-17 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

(Updated Oct. 17, 2015, 7:12 p.m.)


Status
--

This change has been marked as submitted.


Review request for Plasma and Solid.


Changes
---

Submitted with commit d64719de4bf824b40cfe43965f09f8ac74605072 by Igor Poboiko 
to branch master.


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs
-

  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
  dataengines/devicenotifications/ksolidnotify.h a471d50 
  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

(Updated Сен. 16, 2015, 7:23 д.п.)


Review request for Plasma and Solid.


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs (updated)
-

  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
  dataengines/devicenotifications/ksolidnotify.h a471d50 
  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko


> On Сен. 16, 2015, 12:21 д.п., Xuetian Weng wrote:
> > dataengines/devicenotifications/ksolidnotify.cpp, line 131
> > 
> >
> > I'd prefer to make it async.

Are you talking about whole getBlockingApps function or just the loop?


- Igor


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85473
---


On Сен. 15, 2015, 9:41 п.п., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Сен. 15, 2015, 9:41 п.п.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko


> On Сен. 15, 2015, 10:41 п.п., Martin Klapetek wrote:
> > dataengines/devicenotifications/ksolidnotify.cpp, line 122
> > 
> >
> > This should be a private method rather than a static method
> > 
> > (and also const QString& devicePath --> const QString )
> > 
> > 
> > ...I'm thinking that maybe this method should become part of 
> > Solid::StorageAccess itself? Though I'm not the maintainer so I dunno but 
> > it seems it would be useful there
> 
> Xuetian Weng wrote:
> (Not a maintainer either :) ) I agree this should belong to solid, so we 
> can have platform dependent solution for more easily. Similar feature is also 
> implemented in gvfs.
> 
> Actually I'm a little bit surprise that gvfs also uses lsof command to do 
> the same thing instead of parsing procfs. fuser may be an better alternative 
> POSIX choice. (Make sure use the posix compat option if you want to use fuser 
> http://www.unix.com/man-page/posix/1posix/fuser/ , if you run it manually 
> stderr will make the output confusing, run fuser -c / 2>/dev/null to get the 
> pid only output.)

That is a good point, however we definitely need a maintainers word here :)

BTW, it works perfectly with fuser as well (see diff r3, you can easily switch 
between fuser/lsof), since QProcess by default ignores stderr.


- Igor


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85469
---


On Сен. 16, 2015, 7:23 д.п., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Сен. 16, 2015, 7:23 д.п.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.h a471d50 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Kai Uwe Broulik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85488
---


I really like that!

The device notifier UI itself is questionable with the popup telling us "the 
device xyz failed to unmount" rather than just highlighting the device and 
showing the message in the list directly but this is of course outside the 
scope of this patch.

+1 for adding this into Solid


dataengines/devicenotifications/ksolidnotify.h (line 63)


We usually don't add "get" to getters



dataengines/devicenotifications/ksolidnotify.cpp (line 123)


busyApps



dataengines/devicenotifications/ksolidnotify.cpp (line 126)


Use initializer list

{"-m", devicePath}

QStringLiteral could be used too I guess



dataengines/devicenotifications/ksolidnotify.cpp (line 127)


Please don't use waitForFinished as this can easily freeze the entire 
shell. Make it async.



dataengines/devicenotifications/ksolidnotify.cpp (line 129)


const &



dataengines/devicenotifications/ksolidnotify.cpp (line 131)


Q_FOREACH (

Also, we usually use camelCase instead of underscodes



dataengines/devicenotifications/ksolidnotify.cpp (line 133)


if (!pid) {
continue;
}

?



dataengines/devicenotifications/ksolidnotify.cpp (line 157)


Could use plural handling:

i18np("Could not … are opened in \"%1\".", "Could not … are opened in the 
following: %1")


- Kai Uwe Broulik


On Sept. 16, 2015, 7:23 vorm., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 16, 2015, 7:23 vorm.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.h a471d50 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

(Updated Сен. 16, 2015, 10:59 д.п.)


Review request for Plasma and Solid.


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs (updated)
-

  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
  dataengines/devicenotifications/ksolidnotify.h a471d50 
  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Kai Uwe Broulik


> On Sept. 16, 2015, 10:11 vorm., Kai Uwe Broulik wrote:
> > I really like that!
> > 
> > The device notifier UI itself is questionable with the popup telling us 
> > "the device xyz failed to unmount" rather than just highlighting the device 
> > and showing the message in the list directly but this is of course outside 
> > the scope of this patch.
> > 
> > +1 for adding this into Solid

Bonus points for querying KService for the pretty application name :) 

See 
https://quickgit.kde.org/?p=plasma-workspace.git=blob=dataengines%2Fpowermanagement%2Fpowermanagementengine.cpp
 starting on lines 648


- Kai Uwe


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85488
---


On Sept. 16, 2015, 7:23 vorm., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 16, 2015, 7:23 vorm.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.h a471d50 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

(Updated Сен. 16, 2015, 6:07 п.п.)


Review request for Plasma and Solid.


Changes
---

Make process call async. I had to make it using lambda/cloisures magic, because 
I want slot to be aware of list of blocking processes as well as of error from 
solid itself. Also I had to keep in mind that there might be different errors 
from different devices simultaneously, so I can't store error somewhere inside.

Also "fuser" is not a desirable option here, because apparently it doesn't show 
when some process is blocking any subdirectory of mount point, while lsof does.

static_casts when connected to lambda are needed because of signal overload 
(QProcess::finished), see 
[link](https://forum.qt.io/topic/20998/qt5-new-signals-slots-syntax-does-not-work-solved/8)
 for more details.

If someone knows more beautiful solution, I would glad to hear :)


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs (updated)
-

  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
  dataengines/devicenotifications/ksolidnotify.h a471d50 
  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-16 Thread Igor Poboiko


> On Сен. 16, 2015, 6:57 п.п., Valerio De Angelis wrote:
> > File Attachment: Applet with error message - snapshot11.png
> > 
> >
> > Could be possible put here:
> > 1) the same application list shown in the device page as per the 
> > screenshot
> > 2) the applications list in bold

This is actually a notification shown by KNotify4, by same class but from 
KDE4-Runtime. It is installed on my system together with Plasma 5; it shouldn't 
be there.


- Igor


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85507
---


On Сен. 16, 2015, 6:07 п.п., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Сен. 16, 2015, 6:07 п.п.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
>   dataengines/devicenotifications/ksolidnotify.h a471d50 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Martin Klapetek

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85469
---



dataengines/devicenotifications/ksolidnotify.cpp (line 122)


This should be a private method rather than a static method

(and also const QString& devicePath --> const QString )

...I'm thinking that maybe this method should become part of 
Solid::StorageAccess itself? Though I'm not the maintainer so I dunno but it 
seems it would be useful there



dataengines/devicenotifications/ksolidnotify.cpp (lines 135 - 136)


Our codestyle requires braces around ifs



dataengines/devicenotifications/ksolidnotify.cpp (lines 149 - 150)


{}s

(same in the other block)


- Martin Klapetek


On Sept. 15, 2015, 11:41 p.m., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 15, 2015, 11:41 p.m.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85474
---



dataengines/devicenotifications/ksolidnotify.cpp (line 39)


This is unused.



dataengines/devicenotifications/ksolidnotify.cpp (line 156)


", " should also in i18n().



dataengines/devicenotifications/ksolidnotify.cpp (line 192)


This too.


- Xuetian Weng


On Sept. 15, 2015, 9:41 p.m., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 15, 2015, 9:41 p.m.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85473
---



dataengines/devicenotifications/ksolidnotify.cpp (line 131)


I'd prefer to make it async.


- Xuetian Weng


On Sept. 15, 2015, 9:41 p.m., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 15, 2015, 9:41 p.m.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Martin Klapetek

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/#review85458
---


Yes!! Thank you. Couple nitpickings below.


dataengines/devicenotifications/ksolidnotify.cpp (line 136)


const QString _s



dataengines/devicenotifications/ksolidnotify.cpp (line 138)


( pid ) --> (pid)



dataengines/devicenotifications/ksolidnotify.cpp (line 139)


KSysGuard::Process* proc --> KSysGuard::Process *proc



dataengines/devicenotifications/ksolidnotify.cpp (lines 146 - 149)


We put braces around if-else -->

if () {

} else {

}



dataengines/devicenotifications/ksolidnotify.cpp (lines 178 - 201)


It would appear that this is a duplicated function, please make it a 
function and then just call that function in both places


Y

- Martin Klapetek


On Sept. 15, 2015, 10:50 p.m., Igor Poboiko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125248/
> ---
> 
> (Updated Sept. 15, 2015, 10:50 p.m.)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> An attempt to implement feature from [bug 
> 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).
> 
> On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
> processes and obtains names of processes via KSysGuard::Process machinery. 
> Finally it appends obtained information to error message which is shown in 
> tooltip of Device Notifier applet.
> 
> 
> Diffs
> -
> 
>   dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
>   dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125248/diff/
> 
> 
> Testing
> ---
> 
> Tested unmount on busy device with several processes blocking it. Did not 
> test eject, since I have no optical disc drive :(
> 
> 
> File Attachments
> 
> 
> Applet with error message
>   
> https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png
> 
> 
> Thanks,
> 
> Igor Poboiko
> 
>

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


Re: [Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

(Updated Сен. 15, 2015, 9:41 п.п.)


Review request for Plasma and Solid.


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs (updated)
-

  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


[Kde-hardware-devel] Review Request 125248: Display name of process which blocks umount / eject

2015-09-15 Thread Igor Poboiko

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125248/
---

Review request for Plasma and Solid.


Repository: plasma-workspace


Description
---

An attempt to implement feature from [bug 
96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary).

On umount/eject error it runs "lsof" executable, gets PIDs of blocking 
processes and obtains names of processes via KSysGuard::Process machinery. 
Finally it appends obtained information to error message which is shown in 
tooltip of Device Notifier applet.


Diffs
-

  dataengines/devicenotifications/CMakeLists.txt 3f7fd83 
  dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 

Diff: https://git.reviewboard.kde.org/r/125248/diff/


Testing
---

Tested unmount on busy device with several processes blocking it. Did not test 
eject, since I have no optical disc drive :(


File Attachments


Applet with error message
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png


Thanks,

Igor Poboiko

___
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel