quickpreview: Fix warning and simplify code
Merge remote-tracking branch 'origin/2.1'