Remove some QString allocations by using QStringRef

Authored by apol on Sep 9 2017, 9:57 PM.