[qtdocgallery] Fix some compilation and QML-related bugs.

Change-Id: I2beebabd1c64b55ae4db49dd7a11d5333299262a
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>