In order to do this, I changed the Programmer class to no longer take a
filename, but a QIODevice. It should have been done that way originally.
I also rearranged code so that I close the serial port BEFORE sending out
any signals. This was causing a problem if I tried doing something in a
slot connected to one of those signals.
I also fixed a few places where I was forgetting to close the serial
port.