converted all references to QPainter to use the XPainter, a wrapper class on top of QPainter that supports enter/exit to handle begin and end for painting.  This will protect against any errors that occur in the painting process without crashing Qt as well as handle proper cleanup of the painter immediately on scope exit vs. deferring to Qt's cleanup/garbage collection.