qstring-ref: Fix cases where QStringRef wouldn't compile
trimmed() must be treated like left() and right() because it also has an "overload" that returns QStringRef
BUG: 376737