Assistant: Fix high CPU usage if a parent process finishes
authorAlexander Volkov <a.volkov@rusbitech.ru>
Fri, 24 Oct 2014 12:44:44 +0000 (16:44 +0400)
committerAlexander Volkov <a.volkov@rusbitech.ru>
Mon, 22 Dec 2014 19:28:05 +0000 (20:28 +0100)
commit86ec599997adcd08babc818217be4d179c8d5666
treea12687ea37106eb72b3c093286376edd88421c92
parent58bd34016974dbbd0d99adfd497b9aab8ad273bf
Assistant: Fix high CPU usage if a parent process finishes

If Assistant has been started in the remote control mode in Linux
and it's parent process finishes, then Assistant increases CPU load
to 100% and continuously raises it's window.
It is because QSocketNotifier for stdin continuously emits
activated() signal although there is no data to read.
So disable the notifier after receiving EOF.

Change-Id: I1b01108e1b97bc4fd54411b16489082be7f47bf4
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
src/assistant/assistant/stdinlistener.cpp