Qt5 config tuning (issue #12467)

As described in issue #12467, here is all the configuration tuning I propose.

Note that the use of `set -e` in `build.sh` supersedes the change made for issue #12433.  Everything else should be self-explanatory.