add inline operators for qtype comparison, thanks Mark Zealey. Closes #646