Merge from 4.4.2

This involved a hairy merge of 
https://github.com/xtuple/qt-client/pull/364/files
and
https://github.com/xtuple/qt-client/commit/ec1256b3ea922f68f3e9d78aa58933942429552a

Could somebody check that this looks good?