Attempt to fix QT5 build following merger of gallery patches.