musicbrainz/picard — pull request #232 by mineo (2014-03-06 23:13:19+00:00)
Title: Image class again

This is just a redone version of #214.

ccdd175 is a bit of a hackish commit - it's basically https://qt-project.org/doc/qt-4.8/unix-signals.html implemented for pyqt which means that the signal handling only happens after Picard has regained focus if you're ^c-ing it from a terminal. We could use a qtimer to let the python interpreter run often enough for it to properly catch the signals, but since the primary use case of killing picard by sending it a signal is local development.
In addition to that it doesn't work on windows as the qt guide linked before uses unix domain socket to tell Qt about the caught signal and those are not available on windows (and I don't have windows installed anywhere to test a potentially different solution :/).