Even when this question is already solved I want to add, that you could also use the underlying Java method sort(), which is just needing one line and you don't need to add a UDF for this. The code would then look like this:
<cfset qQuery.sort(qQuery.findColumn("nameOfSortColumn"), TRUE)>
The findColumn() call is needed to get the index of the sort column, because sort() is working with the column indexes and not with the column names. The second parameter specifies the sort order: TRUE = ascending, FALSE = descending.
Advantages: one-line call, faster than QoQ
Disadvantage: sort restricted to one column
There are much more hidden features of the underlying Java class. See the following links for more information:
In Lucee (tested with 4.5 and 5.2) this also works similar, and even simpler:
<cfset qQuery.sort("nameOfSortColumn", "asc")>
Hope, this gives some ideas...