Does qmake function unique preserves order of values?
-
Hi,
@
ARGS = 1 2 3 2 5 1
ARGS = $$unique(ARGS) #1 2 3 5
@Does this function preserves order of values in ARGS? For example, may it return 5 3 2 1 ?
Thank you!
-
Hi,
Why not simply test it ?
Currently, the order follows what the is found from left to right.
So having
@
ARGS = 5 2 1 2 5 3
ARGS = $$unique(ARGS)
@Will return 5 2 1 3
-
I've tested. But test doesn't guarantee anything. I want to be sure before commiting it into production code.