[Refactor] More inverts to reduce nesting, general cleanup
[Refactor] Use QT_DISABLE_DEPRECATED_BEFORE 5.2

Disables any functions which have been deprecated as of 5.2.  Cleaned up
anything remaining.  Only algorithmic stuff like qSort needed replacing,
and the std:: library had everything necessary.