[Development] Cleanup of QCoreApplication::watchUnixSignal

Paul Olav Tvete paul.tvete at digia.com
Fri Oct 26 12:02:43 CEST 2012


On Thursday 25 October 2012 12:16:40 Rafael Roquetto wrote:
> Afaik QCoreApplication::watchUnixSignal() seems to be no longer used, at
> least in Qt5. If that is really the case, would anyone object doing away
> with it (and removing the overhead from QEventDispatchUnix::doSelect() and
> co.)? Otherwise, what are the possible use cases?
> 
> Any thoughts?

As the original author, I agree that it should be removed. Since 
watchUnixSignal() is not implemented for the GLib event dispatcher, developers 
cannot rely on it being available. Also, the original use case is no longer 
relevant: it was used by QWS to detect virtual console switching.

The recommended way to watch for UNIX signals in Qt is:
http://doc-snapshot.qt-project.org/5.0/unix-signals.html
(making a signal handler that writes to a socket). 

- Paul



More information about the Development mailing list